Skip to content

Commit

Permalink
Bitwarden: new project (#391)
Browse files Browse the repository at this point in the history
* Bitwarden: new project

* docs(src/builder/convertfiles.py): document Biwarden

* docs(src/builder/convertfiles.py): document Bitwarden
  • Loading branch information
pereorga authored Sep 8, 2024
1 parent d02679f commit 911f09c
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
16 changes: 16 additions & 0 deletions cfg/projects/Bitwarden.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"project": "Bitwarden",
"license": "GPL-3.0-only",
"projectweb": "https://contributing.bitwarden.com/contributing/#localization-l10n",
"fileset": {
"Bitwarden-clients": {
"url": "https://github.com/bitwarden/clients",
"type": "git"
},
"Bitwarden-mobile": {
"url": "https://raw.githubusercontent.com/pereorga/software-translations/master/bitwarden-mobile/AppResources.po",
"target": "bitwarden-mobile-ca.po",
"type": "file"
}
}
}
7 changes: 6 additions & 1 deletion src/builder/convertfiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,17 +259,22 @@ def _convert_json_file_to_po(self, jsonfile, source, target):
os.system(cmd)

def _convert_json_files_to_po(self):
# Used for Privacy Badger
for jsonfile in self.findFiles.find_recursive(
self.convert_dir, "messages.json"
):
if "/ca/" not in jsonfile:
continue

# Used for Privacy Badger
self._convert_json_file_to_po(
jsonfile, "../en_US/messages.json", "../ca/messages.json"
)

# Used for Bitwarden
self._convert_json_file_to_po(
jsonfile, "../en/messages.json", "../ca/messages.json"
)

files = [
("ca.json", "en.json", "ca.json"),
("ca_ES.json", "en.json", "ca_ES.json"),
Expand Down

0 comments on commit 911f09c

Please sign in to comment.