blob: 68a1300c196cc797cbfe86722719b93ab48035e7 [file] [log] [blame]
# Copyright 2022 The Cobalt Authors. All Rights Reserved.
#
# 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.
# This template is meant to be used to convert a set of XLB files into files of
# a simpler format (e.g. CSV) in the product directory, e.g.
# out/stub_debug/content/data/i18n.
template("convert_i18n_data") {
action_foreach(target_name) {
script = "//starboard/build/convert_i18n_data.py"
sources = invoker.xlb_files
inputs = sources
output_dir = "$sb_static_contents_output_data_dir/i18n"
outputs = [ "$output_dir/{{source_name_part}}.csv" ]
args = [
"--input_file",
"{{source}}",
"--output_file",
rebase_path(outputs[0], root_build_dir),
]
}
}