Giter Club home page Giter Club logo

wadoku-mac-dic's Introduction

Howto

Kleines Howto zur Erzeugung des Mac-Wörterbuches.

Vorbemerkungen

Die Umwandlung geschieht in zwei Schritten.

  • Transformation der Wadoku.de-XML-Daten in das XML-Format für Apples Dictionary Development Kit.
  • Erzeugung des Mac-Wörterbuches aus den transformierten Daten.

Für den ersten Schritt wird ein XSLT-Prozessor, der XSLT 2.0 beherrscht, gebraucht.

Für den zweiten Schritt wird das Dictionary Development Kit benötigt. Dieses findet sich derzeit im Paket Additional Tools for Xcode2. Das gesamte Xcode-Paket ist hierfür nicht notwendig.

Im Makefile kann die mindestens benötigte OS X/macOS-Versionen spezifiziert werden.

  • (default) 10.5 (Leopard) DICT_BUILD_OPTS = -v 10.5
  • 10.6 (Snow Leopard) DICT_BUILD_OPTS = -v 10.6
  • 10.11 (El Capitan) DICT_BUILD_OPTS = -v 10.11

Höhere Versionen haben den Vorteil, die Wörterbuchdaten im Allgemeinen stärker zu komprimieren und somit weniger Platz auf der Festplatte zu beanspruchen.

Dateien

xsl/entry_export_macdic.xsl

Hauptskript zur Umwandlung der XML-Daten in das XML-Format des Mac Dictionary Development Kit. Verwendet werden ebenfalls folgende Dateien:

  • front_matter.xsl
  • image_appendix.xsl
  • seasonword_appendix.xsl
  • gramgrp.xsl

Wadoku.css

CSS-Datei zur Formatierung der Einträge im Wörterbuch.

  • Pfad muss als CSS_SRC_PATH bzw. CSS_PATH im Makefile angegeben werden.

OtherResources/lang_pref.xslt

Transformationsskript zur Umsetzung der Voreinstellungen.

OtherResources/Resources

Verzeichnis mit HTML-Dateien für die Voreinstellungselemente.

Troubleshooting

Löschen der Einstellungen und Neustart der Dictionary.app

Für de.wadoku.dictionary.mac ist der Wert des CFBundleIdentifier aus der Info.plist zu verwenden.

/usr/libexec/PlistBuddy -c "Delete :com.apple.DictionaryServices:DCSDictionaryPrefs:de.wadoku.dictionary.mac" ~/Library/Preferences/.GlobalPreferences.plist

Seit macOS 10.12 existiert eine eigene Voreinstellungsdatei in ~/Library/Preferences/com.apple.DictionaryServices.plist, welche zu löschen ist.

Referenzen

Dictionary Services Programming Guide

wadoku-mac-dic's People

Contributors

makigumo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

qunwang6

wadoku-mac-dic's Issues

Support `<count>` element

e.g.

<count>
  <text hasFollowingSpace="true">Zählwort ist</text>
  <ref id="271080" type="other">
    <transcr>…dai</transcr>
    <jap>台</jap>
  </ref>
</count>
<count>
  <text hasFollowingSpace="true">Zählwort der Verkaufsform in Tüten ist</text>
  <ref id="1973791" type="other">
    <transcr>…tai</transcr>
    <jap>袋</jap>
  </ref>
</count>

Unterstützung für Dark Mode

Benötigt u. a. explizite Angabe von DCSDictionaryUseSystemAppearance in der Info.plist.

CSS-Angaben:

html {
  -apple-color-filter: apple-invert-lightness();
}
body {
  font: -apple-system-body;
  font-family: -apple-system;
}
/* @media (prefers-dark-interface) { */
@media (prefers-color-scheme: dark) {
  img {
    filter: invert(100%);
    text-decoration: none;
  }
}
a {
  color: -webkit-link;
}

Farbwerte:

  • -apple-system-label
  • -apple-system-secondary-label
  • -apple-system-tertiary-label
  • -apple-system-text-background

Deutsch -> Japanisch Suche

Danke für das Dictionary! Ich benutze es sehr oft am Mac.

Wäre vielleicht auch eine Suche von Deutsch nach Japanisch möglich? Wenn ich z.B. auf www.wadoku.de Haus eingebe, zeigt es die japanischen Übersetzungen dafür. (Leider in einer seltsamen Reihenfolge, zum Beispiel kommt 家 erst nach ca. 20 viel weniger geläufigen Wörtern, aber das ist ein anderes Problem)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.