Softcatala / translation-memory-tools

A set of tools to build, maintain and use translation memories

Home Page:https://www.softcatala.org/recursos/memories/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add Haiku

pereorga opened this issue · comments

Haiku uses its own format, called catkeys: https://git.haiku-os.org/haiku/tree/data/catalogs

Pootle is used for translation (https://i18n.haiku-os.org/pootle/), therefore, I guess some functionality for converting from catkeys to Gettext may exist. Translate Toolkit has some support for it, but no idea how practical it is.

I have not been able to make pot2po to convert from catkeys to string files. Does it work for you?

Another possibility is to download TMX files from Pootle like we do for LibreOffice but I do not know if the version of Pootle that they use and its configuration allows this at all.

Jordi

Hi,

Does it work for you?

No, it did not. After a first look at the code, I guessed that pot2po does not do any format conversion at all, and that it only accepts template files (but no idea whether catkeys template files exist or not).

I've been asking on IRC and googling around, and I've not been able to find a tool to convert from catkeys format.

They probably should consider using a standard format then they can leverage on standard tooling.

I tend to agree. I also prefer to use more standard operating systems, rather than Haiku. (Still, I find the project quite interesting)

Anyway, turns out that the format is straight-format, and that all files could easily be converted:

curl https://git.haiku-os.org/haiku/plain/data/catalogs/apps/installer/ca.catkeys | tail -n +2 > installer.catkeys
csvcut -t installer.catkeys -c 2,1,4 > installer.csv
csv2po installer.csv installer.po

(The trick was parsing the catkeys format as a TSV file, ignoring the first line)

It should be easy to write a script that loops for all directories and convert all these files massively, but that would be very specific to Haiku. If you prefer not to have this custom logic here, I would also be happy to host these PO files myself.

If you can put the file at github, we can read it from there

What will be really cool is to contribute a catkeys2po to the translatetoolkit (https://github.com/translate/translate/tree/master/translate/convert)

Indeed, that would be awesome.

I created an issue for it: translate/translate#3855

Done it: https://github.com/pereorga/software-translations/tree/master/haiku

(It's in the the same repository than WinSCP ini file)

List of files:

gettext/add-ons_disk_systems_bfs.po
gettext/add-ons_disk_systems_intel.po
gettext/add-ons_disk_systems_ntfs.po
gettext/add-ons_input_server_devices_keyboard.po
gettext/add-ons_mail_daemon_inbound_filters_match_header.po
gettext/add-ons_mail_daemon_inbound_filters_spam_filter.po
gettext/add-ons_mail_daemon_inbound_protocols_imap.po
gettext/add-ons_mail_daemon_inbound_protocols_pop3.po
gettext/add-ons_mail_daemon_outbound_filters_fortune.po
gettext/add-ons_mail_daemon_outbound_protocols_smtp.po
gettext/add-ons_media_media-add-ons_mixer.po
gettext/add-ons_media_media-add-ons_multi_audio.po
gettext/add-ons_screen_savers_butterfly.po
gettext/add-ons_screen_savers_debugnow.po
gettext/add-ons_screen_savers_flurry.po
gettext/add-ons_screen_savers_glife.po
gettext/add-ons_screen_savers_haiku.po
gettext/add-ons_screen_savers_icons.po
gettext/add-ons_screen_savers_ifs.po
gettext/add-ons_screen_savers_leaves.po
gettext/add-ons_screen_savers_message.po
gettext/add-ons_screen_savers_simpleclock.po
gettext/add-ons_screen_savers_slideshowsaver.po
gettext/add-ons_tracker_zipomatic.po
gettext/add-ons_translators_bmp.po
gettext/add-ons_translators_exr.po
gettext/add-ons_translators_gif.po
gettext/add-ons_translators_hvif.po
gettext/add-ons_translators_icns.po
gettext/add-ons_translators_ico.po
gettext/add-ons_translators_jpeg.po
gettext/add-ons_translators_jpeg2000.po
gettext/add-ons_translators_pcx.po
gettext/add-ons_translators_png.po
gettext/add-ons_translators_ppm.po
gettext/add-ons_translators_raw.po
gettext/add-ons_translators_rtf.po
gettext/add-ons_translators_sgi.po
gettext/add-ons_translators_shared.po
gettext/add-ons_translators_stxt.po
gettext/add-ons_translators_tga.po
gettext/add-ons_translators_tiff.po
gettext/add-ons_translators_webp.po
gettext/add-ons_translators_wonderbrush.po
gettext/apps_aboutsystem.po
gettext/apps_activitymonitor.po
gettext/apps_bootmanager.po
gettext/apps_charactermap.po
gettext/apps_clock.po
gettext/apps_codycam.po
gettext/apps_deskbar.po
gettext/apps_deskcalc.po
gettext/apps_devices.po
gettext/apps_diskprobe.po
gettext/apps_diskusage.po
gettext/apps_drivesetup.po
gettext/apps_expander.po
gettext/apps_firstbootprompt.po
gettext/apps_fontdemo.po
gettext/apps_glteapot.po
gettext/apps_haikudepot.po
gettext/apps_icon-o-matic.po
gettext/apps_installer.po
gettext/apps_launchbox.po
gettext/apps_login.po
gettext/apps_magnify.po
gettext/apps_mail.po
gettext/apps_mandelbrot.po
gettext/apps_mediaconverter.po
gettext/apps_midiplayer.po
gettext/apps_musiccollection.po
gettext/apps_networkstatus.po
gettext/apps_overlayimage.po
gettext/apps_packageinstaller.po
gettext/apps_pairs.po
gettext/apps_people.po
gettext/apps_poorman.po
gettext/apps_processcontroller.po
gettext/apps_pulse.po
gettext/apps_screenshot_Screenshot.po
gettext/apps_screenshot_screenshot.po
gettext/apps_showimage.po
gettext/apps_soundrecorder.po
gettext/apps_stylededit.po
gettext/apps_sudoku.po
gettext/apps_terminal.po
gettext/apps_text_search.po
gettext/apps_tracker.po
gettext/apps_tv.po
gettext/apps_workspaces.po
gettext/bin_desklink.po
gettext/bin_dstcheck.po
gettext/bin_filepanel.po
gettext/bin_screen_blanker.po
gettext/kits_bluetooth.po
gettext/kits.po
gettext/kits_mail.po
gettext/kits_textencoding.po
gettext/kits_tracker.po
gettext/preferences_appearance.po
gettext/preferences_backgrounds.po
gettext/preferences_bluetooth.po
gettext/preferences_datatranslations.po
gettext/preferences_deskbar.po
gettext/preferences_filetypes.po
gettext/preferences_keyboard.po
gettext/preferences_keymap.po
gettext/preferences_locale.po
gettext/preferences_mail.po
gettext/preferences_media.po
gettext/preferences_mouse.po
gettext/preferences_notifications.po
gettext/preferences_printers.po
gettext/preferences_screen.po
gettext/preferences_screensaver.po
gettext/preferences_shortcuts.po
gettext/preferences_sounds.po
gettext/preferences_time.po
gettext/preferences_touchpad.po
gettext/preferences_tracker.po
gettext/preferences_virtualmemory.po
gettext/servers_debug.po
gettext/servers_mail.po
gettext/servers_mount.po
gettext/servers_notification.po
gettext/servers_print.po
gettext/servers_registrar.po
gettext/servers_syslog_daemon.po
gettext/tests_kits_game_chart.po
gettext/tests_kits_opengl_glinfo.po
gettext/tests_servers_app_playground.po
gettext/tools_translation_inspector.po

Committed: e05256e