add translators.json
This commit is contained in:
parent
b776768c3f
commit
aa05bbcc4b
2
Makefile
2
Makefile
@ -9,7 +9,7 @@ install:
|
|||||||
cargo build --release
|
cargo build --release
|
||||||
cp -vf target/release/pika-welcome $(DESTDIR)/usr/bin/
|
cp -vf target/release/pika-welcome $(DESTDIR)/usr/bin/
|
||||||
chmod 755 $(DESTDIR)/usr/bin/pika-welcome
|
chmod 755 $(DESTDIR)/usr/bin/pika-welcome
|
||||||
cp -vf data/bin/pika-welcome $(DESTDIR)/usr/bin/pika-welcome-autostart
|
cp -vf data/bin/pika-welcome-autostart $(DESTDIR)/usr/bin/
|
||||||
chmod 755 $(DESTDIR)/usr/bin/pika-welcome-autostart
|
chmod 755 $(DESTDIR)/usr/bin/pika-welcome-autostart
|
||||||
mkdir -p $(DESTDIR)/usr/share/glib-2.0/schemas/
|
mkdir -p $(DESTDIR)/usr/share/glib-2.0/schemas/
|
||||||
mkdir -p $(DESTDIR)/usr/share/
|
mkdir -p $(DESTDIR)/usr/share/
|
||||||
|
2
debian/rules
vendored
2
debian/rules
vendored
@ -15,7 +15,7 @@ override_dh_auto_install:
|
|||||||
/root/.cargo/bin/cargo build --release
|
/root/.cargo/bin/cargo build --release
|
||||||
cp -vf target/release/pika-welcome debian/pika-welcome/usr/bin/
|
cp -vf target/release/pika-welcome debian/pika-welcome/usr/bin/
|
||||||
chmod 755 debian/pika-welcome/usr/bin/pika-welcome
|
chmod 755 debian/pika-welcome/usr/bin/pika-welcome
|
||||||
cp -vf data/bin/pika-welcome debian/pika-welcome/usr/bin/pika-welcome-autostart
|
cp -vf data/bin/pika-welcome-autostart debian/pika-welcome/usr/bin/
|
||||||
chmod 755 debian/pika-welcome/usr/bin/pika-welcome-autostart
|
chmod 755 debian/pika-welcome/usr/bin/pika-welcome-autostart
|
||||||
mkdir -p debian/pika-welcome/usr/share/glib-2.0/schemas/
|
mkdir -p debian/pika-welcome/usr/share/glib-2.0/schemas/
|
||||||
mkdir -p debian/pika-welcome/usr/share/
|
mkdir -p debian/pika-welcome/usr/share/
|
||||||
|
@ -71,9 +71,9 @@ pub fn welcome_content_page(window: &adw::ApplicationWindow, content_box: >k::
|
|||||||
let mut dev_json_array: Vec<GString> = Vec::new();
|
let mut dev_json_array: Vec<GString> = Vec::new();
|
||||||
let dev_json_path = "/usr/share/pika-welcome/config/credits.json";
|
let dev_json_path = "/usr/share/pika-welcome/config/credits.json";
|
||||||
let dev_json_data = std::fs::read_to_string(dev_json_path).expect("Unable to read json");
|
let dev_json_data = std::fs::read_to_string(dev_json_path).expect("Unable to read json");
|
||||||
let dev_json_data: serde_json::Value =
|
let dev_json: serde_json::Value =
|
||||||
serde_json::from_str(&dev_json_data).expect("JSON format invalid");
|
serde_json::from_str(&dev_json_data).expect("JSON format invalid");
|
||||||
if let serde_json::Value::Array(developers) = &dev_json_data["developers"] {
|
if let serde_json::Value::Array(developers) = &dev_json["developers"] {
|
||||||
for developer in developers {
|
for developer in developers {
|
||||||
dev_json_array.push(developer["dev"].as_str().to_owned().unwrap().into())
|
dev_json_array.push(developer["dev"].as_str().to_owned().unwrap().into())
|
||||||
}
|
}
|
||||||
@ -81,10 +81,10 @@ pub fn welcome_content_page(window: &adw::ApplicationWindow, content_box: >k::
|
|||||||
|
|
||||||
let mut translator_json_array: Vec<&str> = Vec::new();
|
let mut translator_json_array: Vec<&str> = Vec::new();
|
||||||
let translator_json_path = "/usr/share/pika-welcome/config/translators.json";
|
let translator_json_path = "/usr/share/pika-welcome/config/translators.json";
|
||||||
let translator_json_data = std::fs::read_to_string(dev_json_path).expect("Unable to read json");
|
let translator_json_data = std::fs::read_to_string(translator_json_path).expect("Unable to read json");
|
||||||
let translator_json_data: serde_json::Value =
|
let translator_json: serde_json::Value =
|
||||||
serde_json::from_str(&translator_json_data).expect("JSON format invalid");
|
serde_json::from_str(&translator_json_data).expect("JSON format invalid");
|
||||||
if let serde_json::Value::Array(translators) = &dev_json_data["translators"] {
|
if let serde_json::Value::Array(translators) = &translator_json["translators"] {
|
||||||
for translator in translators {
|
for translator in translators {
|
||||||
translator_json_array.push(translator["translator"].as_str().to_owned().unwrap())
|
translator_json_array.push(translator["translator"].as_str().to_owned().unwrap())
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user