TreeSheets Documentation

repository·master·Indexed 25 days ago

https://github.com/aardappel/treesheets

An Open Source Free Form Data Organizer using hierarchical spreadsheets for complex data organization, project management, and brainstorming. Documentation covers installation via binaries or Flatpak, building from source with CMake, data import/export (XML, HTML, CSV, PDF, SVG), grid manipulation tools like Hierarchy Swap and Flatten, and internal API constants for actions and text styles.

Tokens
6.1K
Snippets
14
Records
41
Agent score
84%

What's inside TreeSheets

  1. Translate strings in a .po file

    master

    Translation involves filling the msgstr field with the translated text for every msgid found in the .po file.

    Manual Example:

    msgid "Switch to &next file/tab"
    msgstr "Перейти к следующей вкладке"

    Recommended Tool: Poedit is a free, open-source cross-platform editor for gettext localization catalogs. It automatically recompiles the .mo file when you save the .po file.

  2. Visualize translation changes in real-time (Flatpak)

    master

    To preview translation changes immediately in a Flatpak installation, you can link your working translation directory or file to the Flatpak locale path.

    Note: You must first rename the existing file or link to avoid conflicts.

    Option 1: Link the specific ts.mo file Target path: /var/lib/flatpak/runtime/com.strlen.TreeSheets.Locale/x86_64/stable/active/files/ru/share/ru_RU/LC_MESSAGES/ts.mo

    Option 2: Link the entire ru_RU directory Target path: /var/lib/flatpak/app/com.strlen.TreeSheets/current/active/files/share/locale/ru_RU

  3. Create or update the main translation template (.pot file)

    master

    The .pot (Portable Object Template) file contains all strings extracted from the source code. This file is typically managed by developers.

    To create a new template (/TS/translations/ts.pot) from the src/ directory: Run genpot.bat or use the xgettext command.

    To update an existing template after source code changes from the src/ directory: Run ./pot_update.sh or use the xgettext command with the -j flag.

  4. Create a new language translation file (.po file)

    master

    To create a translation for a new language, use the msginit command inside the TS/translations directory. You must first create the target language subdirectory.

    Use an ISO 639-1 two-letter code (e.g., it) or a 5-character combination of ISO 639-1 and ISO 3166-1 (e.g., ru_RU, ru_UA). The encoding is typically UTF-8.

    # Example for Russian (ru_RU)
    mkdir ru_RU
    msginit --input ts.pot --locale=ru_RU.UTF-8 --output=ru_RU/ts.po
  5. Use the Hierarchy Swap command (F8)

    master

    The Hierarchy Swap command (triggered by pressing F8) promotes a selected cell to its grandparent grid. This is used to reorganize hierarchical data by moving a specific tag or item higher up the tree and merging branches that share the same tag name.

    Key Behaviors:

    • Promotion: The selected cell moves to the grandparent level. Its original parent chain becomes a child of the promoted cell.
    • Merging: If multiple cells with the same tag name are found within the grandparent's scope, they are merged into a single node at that level, and their respective children are preserved.
    • Two-Level Hop Rule: Each press operates on the current selection's grandparent grid. If a match is deep in the hierarchy, you may need multiple F8 presses to reach the common ancestor where merging occurs.
    • Ancestor Guard: If an ancestor already shares the same tag name as the selection, the process stops after one promotion to prevent infinite loops (ping-ponging tags).
    F8