Uploaded image for project: 'translate5'
  1. translate5
  2. TRANSLATE-1901

Support lines in pixel-based length check

    XMLWordPrintable

Details

    • High
    • -
    • active

    Description

      Goal

      For some displays it is needed, that you can check the length of one translation, that has more than 1 line on the display. The translator than needs to be able to see and if needed change the position, where the line break is entered.

      Technical concept

      In the configuration for the pixel-based length check in addition to the pixel-length it is defined, how many lines the segment can contain. If there is more than one line defined, the defined length of pixel refers to the length of one line and not to that of a segment.

      When the translator writes and reaches the number of pixels, that are defined for 1 line, translate5 automatically enters a line-break.

      The line-break can be moved by the translator like a normal tag.

      In case he moves it in a position, where a line becomes to long, the line-break tag turns red. Below the segment is shown, how many pixels which line contains and what is the max.

      Still undecided is, if the the automated line-break will only be between words (thus after the last word, that still fits into a line) or if can also be inside a word. If it is inside a word, it still is undecided, if than a dash is automatically entered before the line-break.

      Konzept im Detail

       

      Abschnitt Todo
      Pixel-Mapping
      • Änderung der Pixel-Mapping Struktur, so dass diese nicht mehr Kunden sondern task und auch Datei spezifisch gespeichert werden kann
      Import
      • Erweiterung editor_Models_Import_FileParser_Xlf_Translate5Namespace, so dass pro trans-unit auch eine Zeilenanzahl mit gegeben werden kann
      • Ergänzung der Segment meta daten um die Angabe der Zeilenanzahl (wird bei Kunden-spez. XML direkt aus dem Import befüllt und nicht über die Excel, wie im Default-Mechanismus)
      • Eine Default Vorgabe der Zeilenanzahl soll aus dem task-template kommen, wenn nicht vorhanden wird die Zeilenanzahl mit 1 initiiert.
      GUI / Editor
      Zählung
      • Beim Tippen wird automatisch beim Erreichen der max-length ein line-break tag eingefügt
      • Es dürfen bei segment mit size-unit pixel nur "Zeilenanzahl - 1" line-breaks vorhanden sein und maximal eingefügt werden
      • Der Pixel Zählungsalgorithmus muss geändert werden, so dass die max length pro Zeile und nicht mehr fürs ganze Segment gilt!
      • Der geänderte Zählungsalgorithmus kann generisch für Pixelzählungen implementiert werden, die aktuelle Implementierung entspricht schlichtweg Zeilenanzahl = 1
      • Beim Tippen wird der Zeilenumbruch automatisch eingefügt, es wird aber nichts automatisch angepasst wenn man davor wieder Zeichen rauslöscht.
      GUI / Editor
      Anzeige
      • Ist der Bereich vor einem linebreak zu lang, so wird der linebreak tag rot markiert
      • Die Gesamtanzeige unten drunter muss
        • rot sein, wenn einen einzelne Zeile zu lang ist, im Text sollte dann zusätzlich noch angezeigt werden: "Zeile: 1,2" wenn die Zeilen 1 und 2 zu lang sind.
        • rot sein, wenn die Gesamtlänge (maxlength * lines) überschritten ist
      PHP
      • Anpassung Pixel Längen Validierung in PHP beim Segment speichern, analog Frontend
      PHP
      • Anpassung Tests

      (Wie kann festgelegt werden, dass die Zeilenzahl genau 1 sein MUSS? Nur indem wir 1 NICHT als Vorgabe nehmen. Stattdessen: Wenn in der trans-unit oder im task-template eine maxNumberOfLines angegeben ist, wird auf Zeilenzahl geprüft - andernfalls nicht.)

       

      Attachments

        Issue Links

          Activity

            People

              Ines-Paul Ines-Paul Baumann (Inactive)
              marcmittag Marc Mittag [Administrator]
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: