Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ features = ["about", "multi-window", "tokio", "winit", "surface-message"]
[target.'cfg(unix)'.dependencies]
fork = "0.2"

[build-dependencies]
xdgen = "0.1"

[features]
default = ["dbus-config", "gvfs", "wgpu", "wayland"]
dbus-config = ["libcosmic/dbus-config"]
Expand Down
24 changes: 24 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
use std::{env, fs, path::PathBuf};
use xdgen::{App, Context, FluentString};

fn main() {
let id = "com.system76.CosmicEdit";
let ctx = Context::new("i18n", env::var("CARGO_PKG_NAME").unwrap()).unwrap();
let app = App::new(FluentString("cosmic-text-editor"))
.comment(FluentString("comment"))
.keywords(FluentString("keywords"));
let output = PathBuf::from("target/xdgen");
fs::create_dir_all(&output).unwrap();
fs::write(
output.join(format!("{}.desktop", id)),
app.expand_desktop(format!("res/{}.desktop", id), &ctx)
.unwrap(),
)
.unwrap();
fs::write(
output.join(format!("{}.metainfo.xml", id)),
app.expand_metainfo(format!("res/{}.metainfo.xml", id), &ctx)
.unwrap(),
)
.unwrap();
}
2 changes: 2 additions & 0 deletions i18n/ar/cosmic_edit.ftl
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
cosmic-text-editor = محرِّر نصوص COSMIC
comment = محرِّر نصوص لسطح مكتب COSMIC
keywords = نص;محرر;
new-document = مستند جديد
open-project = افتح مشروعًا
todo = المهامّ
Expand Down
2 changes: 2 additions & 0 deletions i18n/cs/cosmic_edit.ftl
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
comment = Textový editor pro pracovní prostředí COSMIC
keywords = Text;Editor;Poznámky;
new-document = Nový dokument
open-project = Otevřít projekt

Expand Down
1 change: 1 addition & 0 deletions i18n/en/cosmic_edit.ftl
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
cosmic-text-editor = COSMIC Text Editor
comment = Text editor for the COSMIC desktop
new-document = New document
open-project = Open project
todo = TODO
Expand Down
2 changes: 2 additions & 0 deletions i18n/es/cosmic_edit.ftl
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
cosmic-text-editor = Editor de texto COSMIC
comment = Editor de texto de escritorio COSMIC
keywords = Texto;Editor;Notas;
new-document = Nuevo documento
open-project = Abrir proyecto
todo = TODO
Expand Down
2 changes: 2 additions & 0 deletions i18n/hu/cosmic_edit.ftl
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
cosmic-text-editor = COSMIC Szövegszerkesztő
comment = Szövegszerkesztő a COSMIC asztali környezethez
keywords = szöveg;szerkesztő;
new-document = Új dokumentum
open-project = Projekt megnyitása
todo = Teendők
Expand Down
2 changes: 2 additions & 0 deletions i18n/it/cosmic_edit.ftl
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
cosmic-text-editor = COSMIC Text Editor
comment = Editor di testo di COSMIC
keywords = Testo;Editor;Note;Blocco;
new-document = Nuovo documento
open-project = Apri progetto
todo = TODO
Expand Down
2 changes: 2 additions & 0 deletions i18n/pl/cosmic_edit.ftl
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
cosmic-text-editor = Edytor Tekstu COSMIC
comment = Edytor tekstu pulpitu COSMIC
keywords = Edytor;Tekstu;
new-document = Nowy dokument
open-project = Otwórz projekt
todo = TODO
Expand Down
2 changes: 2 additions & 0 deletions i18n/pt-BR/cosmic_edit.ftl
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
cosmic-text-editor = Editor de Texto COSMIC
comment = Editor de texto do desktop COSMIC
keywords = Texto;Editor;Notas;
new-document = Novo documento
open-project = Abrir projeto
todo = TODO
Expand Down
1 change: 1 addition & 0 deletions i18n/ru/cosmic_edit.ftl
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
cosmic-text-editor = Текстовый редактор COSMIC
comment = Текстовый редактор для оболочки COSMIC
new-document = Новый документ
open-project = Открыть проект
todo = TODO
Expand Down
2 changes: 2 additions & 0 deletions i18n/sk/cosmic_edit.ftl
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
cosmic-text-editor = Textový editor COSMIC
comment = Textový editor pre pracovné prostredie COSMIC
keywords = Text;Editor;Poznámky;
new-document = Nový dokument
open-project = Otvoriť projekt
todo = Úloha
Expand Down
2 changes: 2 additions & 0 deletions i18n/sv-SE/cosmic_edit.ftl
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
comment = Textredigerare för skrivbordsmiljön COSMIC
keywords = Text;Editor;Redigerare;
new-document = Nytt dokument
open-project = Öppna projekt
todo = TODO
Expand Down
4 changes: 2 additions & 2 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ bin-src := cargo-target-dir / 'release' / name
bin-dst := base-dir / 'bin' / name

desktop := APPID + '.desktop'
desktop-src := 'res' / desktop
desktop-src := 'target/xdgen' / desktop
desktop-dst := clean(rootdir / prefix) / 'share' / 'applications' / desktop

metainfo := APPID + '.metainfo.xml'
metainfo-src := 'res' / metainfo
metainfo-src := 'target/xdgen' / metainfo
metainfo-dst := clean(rootdir / prefix) / 'share' / 'metainfo' / metainfo

icons-src := 'res' / 'icons' / 'hicolor'
Expand Down
25 changes: 2 additions & 23 deletions res/com.system76.CosmicEdit.desktop
Original file line number Diff line number Diff line change
@@ -1,32 +1,11 @@
#TODO: more build-out, desktop actions, translations?
[Desktop Entry]
Name=COSMIC Text Editor
Name[ar]=محرِّر نصوص COSMIC
Name[cs]=Textový editor COSMIC
Name[zh_CN]=COSMIC 文本编辑器
Name[pl]=Edytor Tekstu COSMIC
Name[pt_BR]=Editor de Texto
Name[hu]=COSMIC Szövegszerkesztő
Name[pt]=Editor de Texto
Name[ru]=Текстовый редактор COSMIC
Name[sk]=Textový editor COSMIC
Name[sv]=COSMIC Textredigerare
Name[es]=Editor de texto COSMIC
Name[it]=Editor di testo COSMIC
Comment=Text editor for the COSMIC desktop
Exec=cosmic-edit %F
Terminal=false
Type=Application
StartupNotify=true
MimeType=text/plain;
Icon=com.system76.CosmicEdit
Categories=COSMIC;Utility;TextEditor;
Keywords=Text;Editor;
Keywords[ar]=نص;محرر;
Keywords[cs]=Text;Editor;Poznámky;
Keywords[pl]=Edytor;Tekstu;
Keywords[pt_BR]=Texto;Editor;Notas;
Keywords[hu]=szöveg;szerkesztő;
Keywords[sk]=Text;Editor;Poznámky;
Keywords[sv]=Text;Editor;Redigerare;
Keywords[es]=Texto;Editor;Notas;
Keywords[it]=Testo;Editor;Note;Blocco;
Keywords=Text;Editor;
24 changes: 4 additions & 20 deletions res/com.system76.CosmicEdit.metainfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,7 @@
<url type="homepage">https://github.com/pop-os/cosmic-edit</url>
<url type="bugtracker">https://github.com/pop-os/cosmic-edit</url>
<name>COSMIC Text Editor</name>
<name xml:lang="ar">محرِّر نصوص COSMIC</name>
<name xml:lang="cs">Textový editor COSMIC</name>
<name xml:lang="pl">Edytor tekstu COSMIC</name>
<name xml:lang="hu">COSMIC Szövegszerkesztő</name>
<name xml:lang="pt_BR">Editor de Texto</name>
<name xml:lang="ru">Текстовый редактор COSMIC</name>
<name xml:lang="sk">COSMIC Textový editor</name>
<name xml:lang="es">Editor de texto</name>
<name xml:lang="it">Editor di testo di COSMIC</name>
<name xml:lang="sv">COSMIC Textredigerare</name>
<summary>Text editor for the COSMIC desktop</summary>
<summary xml:lang="ar">محرِّر نصوص لسطح مكتب COSMIC</summary>
<summary xml:lang="cs">Textový editor pro pracovní prostředí COSMIC</summary>
<summary xml:lang="pl">Edytor tekstu pulpitu COSMIC</summary>
<summary xml:lang="hu">Szövegszerkesztő a COSMIC asztali környezethez</summary>
<summary xml:lang="pt_BR">Editor de texto do desktop COSMIC</summary>
<summary xml:lang="ru">Текстовый редактор для оболочки COSMIC</summary>
<summary xml:lang="sk">Textový editor pre pracovné prostredie COSMIC</summary>
<summary xml:lang="es">Editor de texto de escritorio COSMIC</summary>
<summary xml:lang="it">Editor di testo di COSMIC</summary>
<summary xml:lang="sv">Textredigerare för skrivbordsmiljön COSMIC</summary>
<description>
<p>Text editor that provides advanced features with high performance</p>
<p xml:lang="ar">محرِّر نصوص يوفر ميزات متقدمة بأداء عالٍ</p>
Expand Down Expand Up @@ -89,6 +69,10 @@
<li xml:lang="it">Gestione Git integrata</li>
</ul>
</description>
<keywords>
<keyword>Text</keyword>
<keyword>Editor</keyword>
</keywords>
<launchable type="desktop-id">com.system76.CosmicEdit.desktop</launchable>
<icon type="remote" height="256" width="256">https://raw.githubusercontent.com/pop-os/cosmic-edit/master/res/icons/hicolor/256x256/apps/com.system76.CosmicEdit.svg</icon>
<screenshots>
Expand Down
1 change: 1 addition & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1451,6 +1451,7 @@ impl Application for App {
.icon(icon::from_name(Self::APP_ID))
.version(env!("CARGO_PKG_VERSION"))
.author("System76")
.comments(fl!("comment"))
.license("GPL-3.0-only")
.developers([("Jeremy Soller", "jeremy@system76.com")])
.links([
Expand Down