mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-06 21:00:22 +00:00
Description
This folder provides tools to handle updates of bundle files for language localization. There are three main scripts:
allbundlesscript.py
- generates a csv file containing the relative path of the bundle file, the key, and the value for each property.diffscript.py
- determines the property values that have changed between two commits and generates a csv file containing the relative path, the key, the previous value, the new value, and the change type (addition, deletion, change).updatepropsscript.py
- Given a csv file containing the relative path of the bundle, the key, and the new value, will update the property values for a given language within the project.
All of these scripts provide more details on usage by calling the script with -h
.
Basic Localization Update Workflow
- Call
python3 diffscript.py <output path> -l <language>
to generate a csv file containing differences in properties file values from the language's previous commit to theHEAD
commit. The language identifier should be the abbreviated identifier used for the bundle (i.e. 'ja' for Japanese). - Update csv file with translations
- Call
python3 updatepropsscript.py <input path> -l <language>
to update properties files based on the newly generated csv file. The csv file should be formatted such that the columns are bundle relative path, property files key, translated value and commit id for the latest commit id for which these changes represent. The commit id only needs to be in the header row.
Localization Generation for the First Time
First-time updates should follow a similar procedure except that instead of calling diffscript.py
, call python3 allbundlesscript <output path>
to generate a csv file with relative paths of bundle files, property file keys, property file values.