| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import("//build/config/features.gni") | 5 import("//build/config/features.gni") |
| 6 import("//build/config/ui.gni") | 6 import("//build/config/ui.gni") |
| 7 import("//tools/grit/repack.gni") | 7 import("//tools/grit/repack.gni") |
| 8 | 8 |
| 9 # Arguments: | 9 # Arguments: |
| 10 # | 10 # |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 # limited looping capabilities). | 143 # limited looping capabilities). |
| 144 current_index = 0 | 144 current_index = 0 |
| 145 foreach(input_locale, invoker.input_locales) { | 145 foreach(input_locale, invoker.input_locales) { |
| 146 output_locale = output_locales[current_index] | 146 output_locale = output_locales[current_index] |
| 147 | 147 |
| 148 # Compute the name of the target for the current file. Save it for the deps. | 148 # Compute the name of the target for the current file. Save it for the deps. |
| 149 current_name = "${target_name}_${input_locale}" | 149 current_name = "${target_name}_${input_locale}" |
| 150 locale_targets += [ ":$current_name" ] | 150 locale_targets += [ ":$current_name" ] |
| 151 | 151 |
| 152 _repack_one_locale(current_name) { | 152 _repack_one_locale(current_name) { |
| 153 visibility = ":$group_target_name" | 153 visibility = [ ":$group_target_name" ] |
| 154 locale = input_locale | 154 locale = input_locale |
| 155 | 155 |
| 156 # Compute the output name. Mac uses a different location. | 156 # Compute the output name. Mac uses a different location. |
| 157 if (is_mac || is_ios) { | 157 if (is_mac || is_ios) { |
| 158 output = "${root_gen_dir}/repack/${output_locale}.lproj/locale.pak" | 158 output = "${root_gen_dir}/repack/${output_locale}.lproj/locale.pak" |
| 159 } else { | 159 } else { |
| 160 output = "${root_out_dir}/locales/${output_locale}.pak" | 160 output = "${root_out_dir}/locales/${output_locale}.pak" |
| 161 } | 161 } |
| 162 } | 162 } |
| 163 | 163 |
| 164 current_index = current_index + 1 | 164 current_index = current_index + 1 |
| 165 } | 165 } |
| 166 | 166 |
| 167 # The group that external targets depend on which collects all deps. | 167 # The group that external targets depend on which collects all deps. |
| 168 group(group_target_name) { | 168 group(group_target_name) { |
| 169 if (defined(invoker.visibility)) { | 169 if (defined(invoker.visibility)) { |
| 170 visibility = invoker.visibility | 170 visibility = invoker.visibility |
| 171 } | 171 } |
| 172 deps = locale_targets | 172 deps = locale_targets |
| 173 } | 173 } |
| 174 } | 174 } |
| OLD | NEW |