diff --git a/.gitignore b/.gitignore index f64f22c..ea49e9c 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ node_modules/ __pycache__/ +.vscode diff --git a/README.md b/README.md index bbf468d..2967cb9 100644 --- a/README.md +++ b/README.md @@ -263,7 +263,7 @@ Contributions are welcome! ♥! Please share any features, and add unit tests! U 6. [Arnav Jindal](https://github.com/Daggy1234): For Pull Request [#48](https://github.com/anmol098/waka-readme-stats/pull/48) 7. [Daniel Rowe](https://github.com/DanRowe1): For Pull Request [#57](https://github.com/anmol098/waka-readme-stats/pull/57) -
+
Special mention for those who are currently making their profile readme more awesome :smile: :tada: - [Stanislas](https://github.com/angristan) diff --git a/main.py b/main.py index a813d19..a8ab931 100644 --- a/main.py +++ b/main.py @@ -245,10 +245,7 @@ def generate_commit_list(tz): sumAll = morning + daytime + evening + night sum_week = Sunday + Monday + Tuesday + Friday + Saturday + Wednesday + Thursday - if morning + daytime >= evening + night: - title = "I'm an Early 🐤" - else: - title = "I'm a Night 🦉" + title = translate['I am an Early'] if morning + daytime >= evening + night else translate['I am a Night'] one_day = [ {"name": "🌞 " + translate['Morning'], "text": str(morning) + " commits", "percent": round((morning / sumAll) * 100, 2)}, @@ -332,6 +329,8 @@ def get_waka_time_stats(): if len(data['data']['projects']) == 0: project_list = no_activity else: + # Re-order the project list by percentage + data['data']['projects'] = sorted(data['data']['projects'], key=lambda x: x["percent"], reverse=True) project_list = make_list(data['data']['projects']) stats = stats + '🐱‍💻 ' + translate['Projects'] + ': \n' + project_list + '\n\n' diff --git a/translation.json b/translation.json index dca8002..50ccac9 100644 --- a/translation.json +++ b/translation.json @@ -5,34 +5,36 @@ "Wednesday": "Mercredi", "Thursday": "Jeudi", "Friday": "Vendredi", - "Saturday": "samedi", - "Sunday": "dimanche", + "Saturday": "Samedi", + "Sunday": "Dimanche", "Morning": "Matin", - "Daytime": "Jour", - "Evening": "crépuscule", + "Daytime": "Journée", + "Evening": "Soirée", "Night": "Nuit", - "Languages": "Langages de programmation", + "Languages": "Langages", "Editors": "Éditeurs de code", - "operating system": "système opérateur", - "Projects": "projets", - "Timezone": "fuseau horaire", - "Contributions in the year": "contributions en", - "Used in GitHub's Storage": "utilisés dans le stockage de GitHub", + "operating system": "Système d'exploitation", + "Projects": "Projets", + "Timezone": "Fuseau horaire", + "Contributions in the year": "Contributions en", + "Used in GitHub's Storage": "Utilisés avec le stockage de GitHub", "Opted to Hire": "A choisi d'embaucher", "Not Opted to Hire": "N'a pas choisi d'embaucher", "Profile Views": "Vues du profil", - "From Hello World I have written": "De Hello World, j'ai écrit", - "I am Most Productive on": "Je suis le plus productif", - "This Week I Spend My Time On": "Cette semaine, je passe mon temps", - "I Mostly Code in": "Je code principalement dans", + "From Hello World I have written": "Depuis Hello World, j'ai écrit", + "I am Most Productive on": "Je suis le plus productif sur", + "This Week I Spend My Time On": "Cette semaine, je passe mon temps sur", + "I Mostly Code in": "Je code principalement en", "Timeline": "Chronologie", "No Activity Tracked This Week": "Aucune activité enregistrée cette semaine", "My GitHub Data": "Mes données GitHub", "Lines of code": "Lignes de code", - "public repository": "référentiel public", - "public repositories": "référentiels publics", - "private repository": "référentiel privé", - "private repositories": "référentiels privés" + "public repository": "dépot publique", + "public repositories": "dépots publiques", + "private repository": "dépot privé", + "private repositories": "dépots privés", + "I am an Early": "Je suis un 🐤 du matin", + "I am a Night": "Je suis un 🦉 de nuit" }, "en": { "Monday": "Monday", @@ -67,6 +69,82 @@ "public repository": "Public repository", "public repositories": "Public repositories", "private repository": "Private repository", - "private repositories": "Private repositories" + "private repositories": "Private repositories", + "I am an Early": "I'm an Early 🐤", + "I am a Night": "I'm a Night 🦉" + }, + "it": { + "Monday": "Lunedì", + "Tuesday": "Martedì", + "Wednesday": "Mecoledì", + "Thursday": "Giovedì", + "Friday": "Venerdì", + "Saturday": "Sabato", + "Sunday": "Domenica", + "Morning": "Mattina", + "Daytime": "Giorno", + "Evening": "Pomeriggio", + "Night": "Notte", + "Languages": "Linguaggi di programmazione", + "Editors": "Editor di testo", + "operating system": "Sistema operativo", + "Projects": "Progetti", + "Timezone": "Fuso orario", + "Contributions in the year": "Contributi nell'ultimo anno", + "Used in GitHub's Storage": "Spazio di archiviazione di Github utilizzato", + "Opted to Hire": "Pronto per essere assunto", + "Not Opted to Hire": "Non disponibile per assunzioni/colloqui", + "Profile Views": "Visite al profilo", + "From Hello World I have written": "Dal mio primo Hello World ho scritto ", + "I am Most Productive on": "Sono piu' produttivo di", + "This Week I Spend My Time On": "Questa settimana ho speso il mio tempo su", + "I Mostly Code in": "Solitamente programmo in", + "Timeline": "Linea temporale", + "No Activity Tracked This Week": "Nessuna attività tracciata questa settimana", + "My GitHub Data": "I miei dati GitHub", + "Lines of code": "Linee di codice", + "public repository": "Repository pubblica", + "public repositories": "Repositories pubbliche", + "private repository": "Repository privata", + "private repositories": "Repositories private", + "I am an Early": "Sono un mattiniero 🐤", + "I am a Night": "Sono un notturno 🦉" + }, + "zh": { + "Monday": "星期一", + "Tuesday": "星期二", + "Wednesday": "星期三", + "Thursday": "星期四", + "Friday": "星期五", + "Saturday": "星期六", + "Sunday": "星期天", + "Morning": "早晨", + "Daytime": "白天", + "Evening": "傍晚", + "Night": "晚上", + "Languages": "编程语言", + "Editors": "编辑器", + "operating system": "操作系统", + "Projects": "项目", + "Timezone": "时区", + "Contributions in the year": "今年的贡献", + "Used in GitHub's Storage": "占用了 GitHub 内存", + "Opted to Hire": "选择雇用", + "Not Opted to Hire": "不选择雇用", + "Profile Views": "个人封面观看次数", + "From Hello World I have written": "从你好世界我已经写了", + "I am Most Productive on": "我最有效率是", + "This Week I Spend My Time On": "这周我花我的时间在", + "I Mostly Code in": "我主要编程在于", + "Timeline": "时间线", + "No Activity Tracked This Week": "本周没有记录任何活动", + "My GitHub Data": "我的 GitHub 数据", + "Lines of code": "行代码", + "public repository": "公共仓库", + "public repositories": "公共仓库", + "private repository": "私人仓库", + "private repositories": "私人仓库", + "I am an Early": "我是早起的 🐤", + "I am a Night": "我是晚起的 🦉" } -} \ No newline at end of file +}