scelis / twine

Twine is a command line tool for managing your strings and their translations.
Other
840 stars 151 forks source link

Language deduction #251

Closed sebastianludwig closed 6 years ago

sebastianludwig commented 6 years ago

This fixes the issue raised in #250.

It turned out to be a bigger issue actually effecting all but the Apple and Android formatter. The problem was, that output_path_for_language is implemented in Abstract but the corresponding determine_language_given_path left the task of recognizing the language from a folder name up to the formatter implementations. Some took care of it, some didn't. Most didn't.

While I was on it, I also put the recognition of a filename like [language code].[extension] there. This could change the behaviour of Runner.generate_all_localization_files because it calls formatter.determine_language_given_path but did not call the now deleted Runner.determine_language_given_path - I don't see how though.

sebastianludwig commented 6 years ago

whops. Fixed

scelis commented 6 years ago

👍 Thanks!