Hi Estartu,
As far as I know, extractors only extract messages to .pot files (PO Templates), as their name implies, nothing more. POT files are not associated to a language, they just list messages IDs found in the source code, with the corresponding translations left empty. So, I have doubts about your interpretation that "texts in the code
are interpreted as English by default".
Suggestion: look at the headers of your POT file(s), and see if there is a language defined there (there shouldn't be). It should look like;
#
# SOME DESCRIPTIVE TITLE
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2021.
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE 1.0\n"
"POT-Creation-Date: 2021-04-06 01:56+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS\n"
"Language-Team: LANGUAGE <L...@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Lingua 4.14\n"
As a second step, you merge your POT file with your existing language files (PO files, one per language, whereas there is usually only one POT file per project). The merge process basically:
- creates new entries with empty translations,
- leaves the existing entries alone (apart from updating the locations in the code where they were encountered),
- comments out entries no longer existing in the code.
At that stage, you can update the translations by hand (Emacs, PoEdit, ...) in the PO files (not the POT file, which you should never touch), and then compile them into MO files when you're done. You're not using POEdit on the POT file, right?
Hope this helps,
Laurent.