Requirements:Translations

From ISFDB
Revision as of 04:12, 13 June 2010 by GaborLajos (talk | contribs) (→‎List of changes: additional files)
Jump to navigation Jump to search

This page is intended to be a clean specification for the support of creating/editing/displaying translations. Discussions about the data here should be entered on the discussion page.

Description of the current situation

ISFDB2 support the translations with the following restrictions:

  • Translations of novels can be added as new publications. (Technically it would be possible to add them as variant titles, but the current isfdb guidelines advise to add them as publications.)
  • Translators of the translated works can be added only as text notes of the given publication.
  • Translations of omnibus editions or foreign language omnibus editions can be added but as a consequence this information is displayed on the author's page mixed with the original language omnibus editions.
  • Translations of short stories, magazines cannot are not supported by the isfdb2.

Requirement specification

The translation support enhancement should fulfill the following requirements:

  1. Users should be able set their languages in the user preferences
  2. Author's data should be extended by two optional language fields storing the "working language" of the given author
  3. Title data should be extended by a new optional language field storing the "original language" of the given title. In case of translations the same field should be used to store the translation language.
  4. Authors' summary pages should display only the titles with languages stored in the user preferences
  5. Users should be able to add translations to the titles. If we add translation then the original author cannot be changed, but translators can be added to the translated title. Original title cannot be changed, but new translation title has to be specified. Original language cannot be changed, but new translation language can be added. Translation language and original language cannot be the same language. Title type and story length cannot be changed in the translated title.
  6. In case of editing translations the same limitations apply as described above for adding translations
  7. Translations can be deleted the same way as any other variant titles
  8. Authors' summary pages should diplay only those omnibus titles whose language is one of the authors' "working languages"
  9. Users should be able to query the titles translated to the most languages

Database schema changes

The following database schema changes are required:

ALTER TABLE titles ADD title_language INT(11) DEFAULT NULL;
ALTER TABLE authors ADD author_language INT(11) DEFAULT NULL;
ALTER TABLE authors ADD author_language2 INT(11) DEFAULT NULL;

Note that some changes are already implemented in the database schema:

  • languages table added
  • user_languages table added
  • user_preferences table enhanced with display_all_languages field

UI changes

  • Add "Add Translation to This Title" menu item to the navigation bar of the title screen

Navbar.JPG

  • New title overview for translations (translator added, original language and translation language added)

Title translation.JPG

  • Title screen: translations listed in an own section

Title parent.JPG

  • Author's screen: translation of the given author listed in an own section
  • Author's screen: omnibus list restricted to the "working languages" to the author
  • New "Add translation" screen
  • Edit title screen for translations
  • Edit title screen for original titles and variant titles (extended by original language field)
  • New confirmation screen for add translation action
  • Updated confirmation screen for edit title action

Detailed design

  • common.py
    • add new menu item to the title page
  • mylanguages.py
    • call SQLisDisplayAllLanguages instead of direct db access
  • title.sy
    • add step2 - get the title's authors
      • display original language in the header
      • display original language and translation language in the header for translation
      • display "translation" instead of "varian title" in case of translation
    • in step3 - collect translations and variant titles in different lists
    • step6 - display translations
  • authorClass.py
    • add author_language and author_language2
  • isfdb.py
    • add AUTHOR_LANGUAGE = 14 and AUTHOR_LANGUAGE2 = 15
    • add TITLE_LANGUAGE = 16
    • add MOD_TRANSLATION = 28 with long name "Translation"
    • add DEFAULT_LANGUAGE = 'eng'
  • library.py
    • add new PrintLangField2XML method
  • SQLparsing.py
  • viewers.py
  • addtranslation.py (new source file in the edit package)
  • editauth.py
  • edittitle.py
  • submitauth.py
  • submittitle.py
  • submittranslation.py (new source file in the edit package)
  • aaupdate.py
  • taupdate.py
  • tr_new.py
  • tv_update.py
  • va.new.py