Skip to content

Commit

Permalink
update tool to generate metadata translations (#11869)
Browse files Browse the repository at this point in the history
* updated:

    - strings to translate
    - english metadata

* added:

    - appstream: metadata generator
    - appstream: translation of screenshot captions, if they're present.
    - appstream: link to gh release notes
  • Loading branch information
pazos committed May 26, 2024
1 parent a21db40 commit 3fb2f18
Show file tree
Hide file tree
Showing 7 changed files with 393 additions and 111 deletions.
2 changes: 1 addition & 1 deletion make/appimage.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ update: all
$(SYMLINK) $(abspath $(APPIMAGE_DIR)/AppRun) $(INSTALL_DIR)/koreader/
$(SYMLINK) $(abspath $(APPIMAGE_DIR)/koreader.desktop) $(INSTALL_DIR)/koreader/
$(SYMLINK) $(abspath resources/koreader.png) $(INSTALL_DIR)/koreader/
sed -e 's/%%VERSION%%/$(VERSION)/' -e 's/%%DATE%%/$(RELEASE_DATE)/' $(APPIMAGE_DIR)/koreader.appdata.xml >$(INSTALL_DIR)/koreader/koreader.appdata.xml
sed -e 's/%%VERSION%%/$(VERSION)/' -e 's/%%DATE%%/$(RELEASE_DATE)/' $(PLATFORM_DIR)/common/koreader.metainfo.xml >$(INSTALL_DIR)/koreader/koreader.appdata.xml
# TODO at best this is DebUbuntu specific
$(SYMLINK) /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0 $(INSTALL_DIR)/koreader/libs/libSDL2.so
# required for our stock Ubuntu SDL even though we don't use sound
Expand Down
3 changes: 2 additions & 1 deletion make/linux.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ update: all
$(INSTALL_DIR)/linux/bin \
$(INSTALL_DIR)/linux/lib \
$(INSTALL_DIR)/linux/share/pixmaps \
$(INSTALL_DIR)/linux/share/metainfo \
$(INSTALL_DIR)/linux/share/applications \
$(INSTALL_DIR)/linux/share/doc/koreader \
$(INSTALL_DIR)/linux/share/man/man1
sed -e 's/%%VERSION%%/$(VERSION)/' -e 's/%%DATE%%/$(RELEASE_DATE)/' $(PLATFORM_DIR)/appimage/koreader.appdata.xml >$(INSTALL_DIR)/linux/koreader.appdata.xml
sed -e 's/%%VERSION%%/$(VERSION)/g' -e 's/%%DATE%%/$(RELEASE_DATE)/' $(PLATFORM_DIR)/common/koreader.metainfo.xml >$(INSTALL_DIR)/linux/share/metainfo/koreader.metainfo.xml
cp -pv resources/koreader.png $(INSTALL_DIR)/linux/share/pixmaps
cp -pv $(LINUX_DIR)/koreader.desktop $(INSTALL_DIR)/linux/share/applications
cp -pv $(LINUX_DIR)/copyright COPYING $(INSTALL_DIR)/linux/share/doc/koreader
Expand Down
25 changes: 11 additions & 14 deletions metadata/en-US/full_description.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
* portable: runs on embedded devices (Cervantes, Kindle, Kobo, PocketBook), Android and Linux computers. Developers can run a KOReader emulator in Linux and MacOS.

* multi-format documents: supports fixed page formats (PDF, DjVu, CBT, CBZ) and reflowable e-book formats (EPUB, FB2, Mobi, DOC, CHM, TXT). Scanned PDF/DjVu documents can also be reflowed with the built-in K2pdfopt library.

* full-featured reading: multi-lingual user interface with a highly customizable reader view and many typesetting options. You can set arbitrary page margins, override line spacing and choose external fonts and styles. It has multi-lingual hyphenation dictionaries bundled into the application.

* integrated with calibre (search metadata, receive ebooks wirelessly, browse library via OPDS), Wallabag, Wikipedia, Google Translate and other content providers.

* optimized for e-ink devices: custom UI without animation, with paginated menus, adjustable text contrast, and easy zoom to fit content or page in paged media.

* extensible via plugins

* and much more: look up words with StarDict dictionaries / Wikipedia, add your own online OPDS catalogs and RSS feeds, online over-the-air software updates, an FTP client, an SSH server, …

<p>KOReader is an ebook reader optimized for e-ink screens. It can open many formats and provides advanced text adjustments.</p>
<p>See below for a selection of its many features:</p>
<ul>
<li>Supports both fixed page formats (PDF, DjVu, CBT, CBZ) and reflowable e-book formats (EPUB, FB2, Mobi, DOC, CHM, TXT, HTML). Scanned PDF&#47;DjVu documents can be reflowed. Special flow directions for reading double column PDFs and manga.</li>
<li>Multi-lingual user interface optimized for e-ink screens. Highly customizable reader view with complete typesetting options. Multi-lingual hyphenation dictionaries are bundled in.</li>
<li>Non-Latin script support for books, including the Hebrew, Arabic, Persian, Russian, Chinese, Japanese and Korean languages.</li>
<li>Unique Book Map and Page Browser features to navigate your book.</li>
<li>Special multi-page highlight mode with many local and online export options.</li>
<li>Can synchronize your reading progress across all your KOReader running devices.</li>
<li>Integrated with Calibre, Wallabag, Wikipedia, Google translate and other content providers.</li>
</ul>
2 changes: 1 addition & 1 deletion metadata/en-US/short_description.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Ebook reader with support for many formats like PDF, DjVu, EPUB, FB2, CBZ.
Ebook reader
Original file line number Diff line number Diff line change
@@ -1,63 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--Do not edit this file. Edit "tools/update-metadata.lua" instead-->
<component type="desktop-application">
<id>rocks.koreader.KOReader</id>

<name>KOReader</name>
<summary>Ebook reader</summary>

<description>
<p>KOReader is an ebook reader optimized for e-ink screens. It can open many formats and provides advanced text adjustments.</p>
<p>See below for a selection of its many features:</p>
<ul>
<li>Supports both fixed page formats (PDF, DjVu, CBT, CBZ) and reflowable e-book formats (EPUB, FB2, Mobi, DOC, CHM, TXT, HTML). Scanned PDF/DjVu documents can be reflowed. Special flow directions for reading double column PDFs and manga.</li>
<li>Multi-lingual user interface optimized for e-ink screens. Highly customizable reader view with complete typesetting options. Multi-lingual hyphenation dictionaries are bundled in.</li>
<li>Non-Latin script support for books, including the Hebrew, Arabic, Persian, Russian, Chinese, Japanese and Korean languages.</li>
<li>Unique Book Map and Page Browser features to navigate your book.</li>
<li>Special multi-page highlight mode with many local and online export options.</li>
<li>Can synchronize your reading progress across all your KOReader running devices.</li>
<li>Integrated with Calibre, Wallabag, Wikipedia, Google translate and other content providers.</li>
</ul>
</description>

<screenshots>
<screenshot type="default">
<image>
https://github.com/koreader/koreader-artwork/raw/master/koreader-menu-framed.png</image>
</screenshot>
<screenshot>
<image>
https://github.com/koreader/koreader-artwork/raw/master/koreader-footnotes-framed.png</image>
</screenshot>
<screenshot>
<image>
https://github.com/koreader/koreader-artwork/raw/master/koreader-dictionary-framed.png</image>
</screenshot>
</screenshots>

<categories>
<category>Viewer</category>
<category>Literature</category>
</categories>

<developer_name>KOReader Community</developer_name>
<developer id="rocks.koreader">
<name>KOReader Community</name>
</developer>

<metadata_license>CC0-1.0</metadata_license>
<project_license>AGPL-3.0-only</project_license>

<url type="homepage">https://koreader.rocks/</url>
<url type="bugtracker">https://github.com/koreader/koreader/issues</url>
<url type="faq">https://github.com/koreader/koreader/wiki</url>
<url type="faq">https://koreader.rocks/user_guide</url>
<url type="translate">https://hosted.weblate.org/engage/koreader/</url>
<url type="vcs-browser">https://github.com/koreader/koreader</url>
<url type="contribute">https://koreader.rocks/doc/</url>
<url type="contribute">https://github.com/koreader/koreader</url>

<branding>
<color type="primary" scheme_preference="light">#ffffff</color>
<color type="primary" scheme_preference="dark">#303030</color>
</branding>

<requires>
<memory>128</memory>
<display_length>360</display_length>
</requires>

Expand Down Expand Up @@ -117,9 +83,57 @@

<launchable type="desktop-id">rocks.koreader.KOReader.desktop</launchable>

<releases>
<release version="%%VERSION%%" date="%%DATE%%"/>
</releases>
<categories>
<category>Office</category>
<category>Viewer</category>
<category>Literature</category>
</categories>

<content_rating type="oars-1.1"/>

<summary>Ebook reader</summary>
<description>
<p>KOReader is an ebook reader optimized for e-ink screens. It can open many formats and provides advanced text adjustments.</p>
<p>See below for a selection of its many features:</p>
<ul>
<li>Supports both fixed page formats (PDF, DjVu, CBT, CBZ) and reflowable e-book formats (EPUB, FB2, Mobi, DOC, CHM, TXT, HTML). Scanned PDF&#47;DjVu documents can be reflowed. Special flow directions for reading double column PDFs and manga.</li>
<li>Multi-lingual user interface optimized for e-ink screens. Highly customizable reader view with complete typesetting options. Multi-lingual hyphenation dictionaries are bundled in.</li>
<li>Non-Latin script support for books, including the Hebrew, Arabic, Persian, Russian, Chinese, Japanese and Korean languages.</li>
<li>Unique Book Map and Page Browser features to navigate your book.</li>
<li>Special multi-page highlight mode with many local and online export options.</li>
<li>Can synchronize your reading progress across all your KOReader running devices.</li>
<li>Integrated with Calibre, Wallabag, Wikipedia, Google translate and other content providers.</li>
</ul>
</description>
<screenshots>
<screenshot type="default">
<image>https://github.com/koreader/koreader-artwork/raw/master/koreader-menu-framed.png</image>
</screenshot>
<screenshot>
<image>https://github.com/koreader/koreader-artwork/raw/master/koreader-footnotes-framed.png</image>
</screenshot>
<screenshot>
<image>https://github.com/koreader/koreader-artwork/raw/master/koreader-dictionary-framed.png</image>
</screenshot>
</screenshots>
<keywords>
<keyword>reader</keyword>
<keyword>viewer</keyword>
<keyword>dictionary</keyword>
<keyword>wikipedia</keyword>
<keyword>wallabag</keyword>
<keyword>annotations</keyword>
<keyword>epub</keyword>
<keyword>fb2</keyword>
<keyword>pdf</keyword>
<keyword>djvu</keyword>
</keywords>
<releases>
<release version="%%VERSION%%" date="%%DATE%%">
<description>
<p>Release notes available on the link below</p>
</description>
<url>https://github.com/koreader/koreader/releases/tag/%%VERSION%%</url>
</release>
</releases>
</component>
2 changes: 1 addition & 1 deletion platform/linux/do_debian_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ fi
mkdir -p tmp-debian/usr
chmod 0755 tmp-debian/usr
tar -xf "${1}" -C tmp-debian/usr
rm -f tmp-debian/usr/koreader.appdata.xml tmp-debian/usr/README.md
rm -f tmp-debian/usr/README.md
ARCH="$(echo "${1}" | cut -d '-' -f3)"
VERSION="$(cut -f2 -dv "tmp-debian/usr/lib/koreader/git-rev" | cut -f1,2 -d-)"
DEB_ARCH="$(uname_to_debian "${ARCH}")"
Expand Down
Loading

0 comments on commit 3fb2f18

Please sign in to comment.