| OLD | NEW |
| 1 #!/bin/sh | 1 #!/bin/sh |
| 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 # Keep only the currencies used by the larget 60 economies in terms of GDP | 6 # Keep only the currencies used by the larget 60 economies in terms of GDP |
| 7 # with several more added in. | 7 # with several more added in. |
| 8 # TODO(jshin): Use ucurr_isAvailable in ICU to drop more currencies. | 8 # TODO(jshin): Use ucurr_isAvailable in ICU to drop more currencies. |
| 9 # See also http://en.wikipedia.org/wiki/List_of_circulating_currencies | 9 # See also http://en.wikipedia.org/wiki/List_of_circulating_currencies |
| 10 # Copied from scripts/trim_data.sh. Need to refactor. | 10 # Copied from scripts/trim_data.sh. Need to refactor. |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 ;; | 157 ;; |
| 158 ar) | 158 ar) |
| 159 EXTRA_CAL='arabic' | 159 EXTRA_CAL='arabic' |
| 160 ;; | 160 ;; |
| 161 fa) | 161 fa) |
| 162 EXTRA_CAL='persian' | 162 EXTRA_CAL='persian' |
| 163 ;; | 163 ;; |
| 164 ja) | 164 ja) |
| 165 EXTRA_CAL='japanese' | 165 EXTRA_CAL='japanese' |
| 166 ;; | 166 ;; |
| 167 *) |
| 168 EXTRA_CAL='' |
| 169 ;; |
| 167 esac | 170 esac |
| 168 | 171 |
| 169 # Add 'roc' calendar to zh_Hant*. | 172 # Add 'roc' calendar to zh_Hant*. |
| 170 [[ "$(basename $i .txt)" =~ 'zh_Hant' ]] && { EXTRA_CAL="$EXTRA_CAL|roc"; } | 173 [[ "$(basename $i .txt)" =~ 'zh_Hant' ]] && { EXTRA_CAL="${EXTRA_CAL}|roc"; } |
| 171 | 174 |
| 172 CAL_PATTERN="(${COMMON_CALENDARS}|${EXTRA_CAL})" | 175 CAL_PATTERN="${COMMON_CALENDARS}${EXTRA_CAL:+|${EXTRA_CAL}}" |
| 173 echo $CAL_PATTERN | 176 echo $CAL_PATTERN |
| 174 | 177 |
| 175 echo Overwriting $i... | 178 echo Overwriting $i... |
| 176 sed -r '/^ calendar\{$/,/^ \}$/ { | 179 sed -r '/^ calendar\{$/,/^ \}$/ { |
| 177 /^ calendar\{$/p | 180 /^ calendar\{$/p |
| 178 /^ '${CAL_PATTERN}'\{$/, /^ \}$/p | 181 /^ '${CAL_PATTERN}'\{$/, /^ \}$/p |
| 179 /^ \}$/p | 182 /^ \}$/p |
| 180 d | 183 d |
| 181 }' -i $i | 184 }' -i $i |
| 182 done | 185 done |
| 183 | 186 |
| 184 echo DONE. | 187 echo DONE. |
| OLD | NEW |