This repository has been archived by the owner on Apr 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from FoldingCommunity/master
Update of head repository
- Loading branch information
Showing
23 changed files
with
156 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
name: Validate translation files | ||
on: [push, pull_request] | ||
jobs: | ||
validate: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install pyyaml | ||
- name: Validate | ||
run: ./validate_yaml.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
# Ignore everything in this directory | ||
* | ||
# Except this file | ||
!.gitignore | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
# Ignore everything in this directory | ||
* | ||
# Except this file | ||
!.gitignore | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
url: "https://foldingathome.org/support/faq/" | ||
language: "en-US" | ||
title: "FAQ" | ||
text: [ | ||
# Bold paragraph | ||
"You’ll find a large library of frequently asked questions about all things connected to Folding@home.", | ||
|
||
# The rest of the paragraph | ||
"This section contains everything from guides and information about how to install and use the Folding@home software to the science behind our research. Look through the sidebar and find the topic you want to know more about." | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
# Ignore everything in this directory | ||
* | ||
# Except this file | ||
!.gitignore | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
# Ignore everything in this directory | ||
* | ||
# Except this file | ||
!.gitignore | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,11 @@ | ||
--- | ||
url: "https://foldingathome.org/about/" | ||
language: "fr-FR" | ||
title: "A propos" | ||
title: "À propos" | ||
text: [ | ||
# Bold text at the start | ||
"Folding @ home (FAH or F @ h)", | ||
"Folding@home (FAH ou F@H)", | ||
|
||
# The rest of the paragraph | ||
# "is a distributed computing project for simulating protein dynamics, including the process of protein folding and the movements of proteins implicated in a variety of diseases. It brings together citizen scientists who volunteer to run simulations of protein dynamics on their personal computers. Insights from this data are helping scientists to better understand biology, and providing new opportunities for developing therapeutics. " | ||
"Folding@home (FAH ou F@h) est un projet de calcul distribué qui simule des protéines dynamiques, incluant le processus de repliement de protéines ainsi que le mouvement de protéines impliquées dans de nombreuses maladies. Ce projet rassemble des citoyens scientifiques bénévoles qui exécute des simulations de protéines dynamiques sur leurs ordinateurs personnels. Les perspectives de ces données sont d'aider les scientifiques à mieux comprendre la biologie et de leur donner des opportunités de développer des nouveaux traitements." | ||
"est un projet de calcul distribué qui simule la dynamique des protéines, y compris leur processus de repliement et leurs mouvements, des phénomènes impliqués dans de nombreuses maladies. Ce projet réunit des « citoyens scientifiques » bénévoles qui exécutent de telles simulations sur leur ordinateur personnel. Les enseignements ainsi obtenus aident les scientifiques à mieux comprendre la biologie en présence et leur permettent de développer de nouveaux traitements." | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
--- | ||
url: "https://foldingathome.org/statistics/" | ||
language: "fr-FR" | ||
title: "STATISTIQUES" | ||
text: [ | ||
# First two paragraphs | ||
# "One of the best ways to help Folding@home is by recruiting your friends and family. Start by sharing our project with them. Then join a team or even start your own team. The more points your team earns, the closer we come to finding cures. | ||
# On this page you will find access to statistics for individuals and teams who have joined together to earn points and compete with other teams. Some of us are quite intense in our approach to folding. We have team websites, we supe up our computers, and we drive the technology forward by reporting bugs and making suggestions about how to improve the software.", | ||
"Un des meilleurs moyens d'aider Folding@home est d'inviter vos amis et votre famille. Commencez par partager notre projet avec eux. Puis rejoignez une équipe ou créez la vôtre. Plus votre équipe gagne de points, plus nous avons de chances de trouver des remèdes. | ||
Sur cette page, vous allez avoir accès aux statistiques par participant et par équipe, lesquelles rivalisent avec les autres équipes. Certains parmi nous sont des passionnés. Nous avons des sites d'équipes, nous vitaminons nos ordinateurs, et nous faisons progresser le projet en signalant les problèmes rencontrés et en suggérarnt des améliorations.", | ||
|
||
# Maximise your effort stylistic bold text | ||
# "MAXIMIZE your EFFORT", | ||
"MAXIMISEZ votre PARTICIPATION", | ||
|
||
# SET UP YOUR TEAM | ||
# "SET UP YOUR TEAM", | ||
"CONFIGUREZ VOTRE ÉQUIPE", | ||
|
||
# Associated text for setting up a team | ||
# "If you are interested in setting up a team of your own, you can get started here.", | ||
"Si vous souhaitez configurer votre propre équipe, vous pouvez commencer ici.", | ||
|
||
# START A TEAM button | ||
# "START A TEAM", | ||
"CRÉER UNE ÉQUIPE", | ||
|
||
# CHANGE YOUR TEAM INFO button | ||
# "CHANGE YOUR TEAM INFO", | ||
"MODIFIER VOTRE ÉQUIPE", | ||
|
||
# Lost team password? link | ||
# "Lost team password?", | ||
"Mot de passe d'équipe perdu?", | ||
|
||
# Heading 1 | ||
# "MONITORING STATS UPDATES AUTOMATICALLY: AVAILABLE DOWNLOADS AND RULES OF USE", | ||
"SURVEILLANCE AUTOMATIQUE DES STATISTIQUES : TÉLÉCHARGEMENTS ET RÈGLES D'USAGE", | ||
|
||
# Text block | ||
# "The donor and team stats are updated every hour, although this can be delayed if there were a lot of work units to come back during that hour. We have been turning off web access to the stats database during stats updates (usually on the hour). | ||
# Please do not use scripts to access the donor or team pages, but use the full donor list (flat files) instead. IP addresses which do not abide by our robots.txt rules will be banned." | ||
"Les statisitques des donateurs et de des équipes sont mises à jour toutes les heures, bien qu'un délai soit possible si un grand nombre d'unités de travail doit être retourné durant cette heure. Nous suspendons l'accès à la base de données des statistiques durant la mise à jour (habituallement dans l'heure). | ||
Merci de ne pas utiliser des scripts pour consulter les pages des donateurs et/ou des équipes : veuillez utiliser la liste complète des donateurs. Les adresses IP qui ne ne respectent pas nos règles seront bannies." | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
# Ignore everything in this directory | ||
* | ||
# Except this file | ||
!.gitignore | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
# Ignore everything in this directory | ||
* | ||
# Except this file | ||
!.gitignore | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
# Ignore everything in this directory | ||
* | ||
# Except this file | ||
!.gitignore | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
# Ignore everything in this directory | ||
* | ||
# Except this file | ||
!.gitignore | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
# Ignore everything in this directory | ||
* | ||
# Except this file | ||
!.gitignore | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
# Ignore everything in this directory | ||
* | ||
# Except this file | ||
!.gitignore | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
# Ignore everything in this directory | ||
* | ||
# Except this file | ||
!.gitignore | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
# Ignore everything in this directory | ||
* | ||
# Except this file | ||
!.gitignore | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
# Ignore everything in this directory | ||
* | ||
# Except this file | ||
!.gitignore | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
#!/usr/bin/env python3 | ||
|
||
import fnmatch | ||
import yaml | ||
import traceback | ||
import os | ||
|
||
|
||
def find(pattern, path): | ||
result = [] | ||
for root, dirs, files in os.walk(path): | ||
for name in files: | ||
if fnmatch.fnmatch(name, pattern): | ||
result.append(os.path.join(root, name)) | ||
return result | ||
|
||
|
||
# eg: Localization/en-US/statistics.yaml | ||
def path_to_language(file): | ||
(head, tail) = os.path.split(file) | ||
(head, tail) = os.path.split(head) | ||
return tail | ||
|
||
|
||
def filename_is(path, filename): | ||
(head, tail) = os.path.split(path) | ||
return tail == filename | ||
|
||
|
||
def ensure_schema(translation, path): | ||
keys = ["url", "language", "text", "title"] | ||
|
||
for key in keys: | ||
if key not in translation: | ||
raise Exception("Missing '%s' key in %s" % (key, path)) | ||
|
||
|
||
def ensure_language(translation, path): | ||
expected_language = path_to_language(path) | ||
if translation["language"] != expected_language: | ||
raise Exception( | ||
"%s was expected to be in language %s, but instead was %s" % | ||
(path, expected_language, translation["language"])) | ||
|
||
|
||
exit_code = 0 | ||
for path in find("*.yaml", "Localization"): | ||
with open(path) as f: | ||
print("Validating", path) | ||
try: | ||
translation = yaml.safe_load(f) | ||
ensure_schema(translation, path) | ||
ensure_language(translation, path) | ||
except Exception as e: | ||
exit_code = 1 | ||
traceback.print_exc() | ||
|
||
exit(exit_code) |