Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[Locale] renamed function

  • Loading branch information...
commit 025f9729733c9ccac6824b584bb9398c5fbed15a 1 parent 8da99ca
@eriksencosta eriksencosta authored
Showing with 6 additions and 6 deletions.
  1. +6 −6 src/Symfony/Component/Locale/Resources/data/build-data.php
View
12 src/Symfony/Component/Locale/Resources/data/build-data.php
@@ -159,7 +159,7 @@ function download_icu_data($version) {
return $checkoutPath;
}
-function is_42_or_earlier($version)
+function is_icu_version_42_or_earlier($version)
{
return version_compare($version, '4.4', '<');
}
@@ -271,7 +271,7 @@ function create_svn_info_file($source, $target)
$source = realpath($source);
// Currency, language and region data are bundled in the locales directory in ICU <= 4.2
-if (!is_42_or_earlier($version)) {
+if (!is_icu_version_42_or_earlier($version)) {
check_dir($source.DIRECTORY_SEPARATOR.'curr');
check_dir($source.DIRECTORY_SEPARATOR.'lang');
check_dir($source.DIRECTORY_SEPARATOR.'region');
@@ -298,7 +298,7 @@ function create_svn_info_file($source, $target)
// Currency data is available at the locales data files in ICU <= 4.2 and the supplementalData file is available at the
// misc directory
-if (is_42_or_earlier($version)) {
+if (is_icu_version_42_or_earlier($version)) {
genrb_file($currDir, $source.DIRECTORY_SEPARATOR.'locales', 'en', $icuBinPath);
genrb_file($currDir, $source.DIRECTORY_SEPARATOR.'misc', 'supplementalData', $icuBinPath);
} else {
@@ -319,7 +319,7 @@ function create_svn_info_file($source, $target)
clear_directory($langDir);
// Language data is available at the locales data files in ICU <= 4.2
-if (is_42_or_earlier($version)) {
+if (is_icu_version_42_or_earlier($version)) {
genrb($source.DIRECTORY_SEPARATOR.'locales', $langDir, $icuBinPath);
} else {
genrb($source.DIRECTORY_SEPARATOR.'lang', $langDir, $icuBinPath);
@@ -333,7 +333,7 @@ function create_svn_info_file($source, $target)
clear_directory($regionDir);
// Region data is available at the locales data files in ICU <= 4.2
-if (is_42_or_earlier($version)) {
+if (is_icu_version_42_or_earlier($version)) {
genrb($source.DIRECTORY_SEPARATOR.'locales', $regionDir, $icuBinPath);
} else {
genrb($source.DIRECTORY_SEPARATOR.'region', $regionDir, $icuBinPath);
@@ -518,7 +518,7 @@ function create_svn_info_file($source, $target)
// Even if the source and generated file are UTF-8 encoded, for some reason the data seems not correctly encoded, leading to
// a parse error in genrb (Stopped parsing resource with U_ILLEGAL_CHAR_FOUND). So we call the genrb passing that the source
// files are UTF-8 encoded.
-if (is_42_or_earlier($version)) {
+if (is_icu_version_42_or_earlier($version)) {
genrb($namesGeneratedDir, $namesDir, $icuBinPath, '-e UTF-8');
} else {
genrb($namesGeneratedDir, $namesDir, $icuBinPath);
Please sign in to comment.
Something went wrong with that request. Please try again.