commit 6f78888932c90c5c583a1bcff357ea8d8f08eab2daa2e30da4a7b44638253c0d Author: Takashi Iwai Date: Tue Sep 10 08:06:19 2024 +0000 New package. OBS-URL: https://build.opensuse.org/package/show/M17N/translate-suse-desktop?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/_service b/_service new file mode 100644 index 0000000..e86b50e --- /dev/null +++ b/_service @@ -0,0 +1,16 @@ + + + git@github.com:openSUSE/suse-desktop-translations.git + git + %cd.%h + 0 + enable +opensuse-packaging@opensuse.org +refs/heads/main + + + *.tar + xz + + + diff --git a/_servicedata b/_servicedata new file mode 100644 index 0000000..301ed34 --- /dev/null +++ b/_servicedata @@ -0,0 +1,4 @@ + + + git@github.com:openSUSE/suse-desktop-translations.git + 481ec87e723761951fbe3f2f73aabad851a34f34 \ No newline at end of file diff --git a/suse-desktop-translations-0.20240907.481ec87.tar.xz b/suse-desktop-translations-0.20240907.481ec87.tar.xz new file mode 100644 index 0000000..706717b --- /dev/null +++ b/suse-desktop-translations-0.20240907.481ec87.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5d4999b7663a25af8cb34e80e310efc7bc93a58b2c5c9dccd39a2e07b07e1167 +size 23404 diff --git a/translate-suse-desktop.changes b/translate-suse-desktop.changes new file mode 100644 index 0000000..e55f807 --- /dev/null +++ b/translate-suse-desktop.changes @@ -0,0 +1,12 @@ +------------------------------------------------------------------- +Sat Sep 07 01:46:14 UTC 2024 - opensuse-packaging@opensuse.org + +- Update to version 0.20240907.481ec87: + * First import of translations from a newly created project. + +------------------------------------------------------------------- +Fri Sep 6 19:01:26 UTC 2024 - Stanislav Brabec + +- New package that supports translation of SUSE specific desktop + files. (boo#1158957) + diff --git a/translate-suse-desktop.spec b/translate-suse-desktop.spec new file mode 100644 index 0000000..d3f9ff8 --- /dev/null +++ b/translate-suse-desktop.spec @@ -0,0 +1,54 @@ +# +# spec file for package translate-suse-desktop +# +# Copyright (c) 2024 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +Name: translate-suse-desktop +Version: 0.20240907.481ec87 +Release: 0 +Summary: A Build Tool to Provide Desktop Translation +License: GPL-3.0-or-later +Group: Development/Tools/Building +Source: suse-desktop-translations-%{version}.tar.xz +Source1: translate_suse_desktop.macro +Source2: translate_suse_desktop.sh +Requires: intltool +BuildArch: noarch + +%description +This package provides a tool that will import translations for SUSE +specific desktop files. + +%prep +%setup -q -n suse-desktop-translations-%{version} +cp -a %{SOURCE1} %{SOURCE2} . + +%build + +%install +for PO in po/*.po ; do + install -m0644 -D $PO $RPM_BUILD_ROOT%{_datadir}/%{name}/${PO##*/} +done +install -m0755 -D translate_suse_desktop.sh $RPM_BUILD_ROOT%{_rpmconfigdir}/translate_suse_desktop.sh +install -m0644 -D translate_suse_desktop.macro $RPM_BUILD_ROOT%{_rpmmacrodir}/macros.translate_suse_desktop + +%files +%defattr(-,root,root) +%{_datadir}/%{name} +%{_rpmconfigdir}/* +%{_rpmmacrodir}/* + +%changelog diff --git a/translate_suse_desktop.macro b/translate_suse_desktop.macro new file mode 100644 index 0000000..7b26026 --- /dev/null +++ b/translate_suse_desktop.macro @@ -0,0 +1,6 @@ +# macro: %translate_suse_desktop +# Used to add easily a category to .desktop files according to XDG +# standard. +%translate_suse_desktop() \ + /usr/lib/rpm/translate_suse_desktop.sh %{**} \ + %nil diff --git a/translate_suse_desktop.sh b/translate_suse_desktop.sh new file mode 100644 index 0000000..ca67ba6 --- /dev/null +++ b/translate_suse_desktop.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +# macro: translate_suse_desktop +# +# Used to add translation to a SUSE specifc .desktop files. +# + +set -o errexit +intltool-merge /usr/share/translate-suse-desktop $1.in $1 -d -u +mkdir -p suse_translate_desktop +cd suse_translate_desktop +ln ../$1.in . +intltool-extract --type=gettext/ini $1.in +xgettext --default-domain=$APPLICATION --add-comments --keyword=_ --keyword=N_ --keyword=U_ $1.in.h -o ${1%.desktop}.pot +RPM_OTHER_DIR=${RPM_BUILD_DIR%/BUILD*}/OTHER +if test -f $RPM_OTHER_DIR/translate-suse-desktop.tar.gz ; then + X=r +else + X=c +fi +tar ${X}f $RPM_OTHER_DIR/translate-suse-desktop.tar.gz ${1%.desktop}.pot +echo "Wrote ${1%.desktop}.pot to $RPM_OTHER_DIR/translate-suse-desktop.gz" +echo "with for https://github.com/openSUSE/suse-desktop-translations translatable by" +echo "https://l10n.opensuse.org/projects/suse-desktop-translations/"