Go to https://{{your_shopify_domain}}/admin/themes/{{your_theme_code}}/language?category=checkout+%26+system
Open your browser console and paste this code:
var obj = {};
$(".translation__target").each(function() {
var value = this.children[0].value ? this.children[0].value : this.children[0].placeholder
_.set(obj, this.children[0].dataset.key, value);
});
var data = window.URL.createObjectURL(new Blob([JSON.stringify(obj, null, 2)], {type: "application/json;charset=utf-8;"}));
$("<a download='en.system_keys.json'></a>").appendTo($("body")).attr('href', data)[0].click();
Open your browser console and paste this code:
var jsonToMerge = "https://raw.githubusercontent.com/QuintinS/shopcreatify-elivar-eu/master/locales/zh-CN.json"
var mergeData = function(body) {
var obj = {};
var chinese = JSON.parse(body);
var getText = function(key, fallback) {
return (_.get(chinese, key)) ? _.get(chinese, key) : fallback;
};
$(".translation__target").each(function() {
_.set(obj, this.children[0].dataset.key, getText(this.children[0].dataset.key, this.children[0].placeholder));
});
var data = window.URL.createObjectURL(new Blob([JSON.stringify(obj, null, 2)], {type: "application/json;charset=utf-8;"}));
$("<a download='zh-CN.json'></a>").appendTo($("body")).attr('href', data)[0].click()
}
$.get(jsonToMerge, mergeData);
The browser will download your JSON file with Shopify translation keys
@ridem Fantastic job! The issue that I'm getting is "Billing address" line, which is too high. When I had same locale translation on the previous theme but made within language editor, this problem didn't occur. Theme guy from Shopify stuff told me, that they do not support checkout language from the JSON file and it might be the reason.

