From 7998bbc104a1d45697f2279e6f084745d9a3c0d1 Mon Sep 17 00:00:00 2001 From: Yudong Jin Date: Sat, 7 Nov 2026 04:50:57 +0800 Subject: [PATCH] Count Chinese code examples and all Python editions in language statistics (#2021) --- .gitattributes | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/.gitattributes b/.gitattributes index 9dee993e2..a379dfcdf 100644 --- a/.gitattributes +++ b/.gitattributes @@ -6,14 +6,22 @@ *.swift linguist-language=Swift *.js linguist-language=JavaScript -*.c linguist-language=Other -*.h linguist-language=Other -*.cs linguist-language=Other -*.zig linguist-language=Other -*.rs linguist-language=Other -*.ts linguist-language=Other -*.dart linguist-language=Other -*.kt linguist-language=Other +*.c linguist-language=C +*.h linguist-language=C +*.cs linguist-language=C# +*.zig linguist-language=Zig +*.rs linguist-language=Rust +*.ts linguist-language=TypeScript +*.dart linguist-language=Dart +*.kt linguist-language=Kotlin + +# Count all programming languages in the Simplified Chinese code examples. +# Reset to Linguist defaults so documentation and data stay excluded. +* linguist-detectable=false +/codes/** !linguist-detectable + +# Count Python examples across every natural-language edition. +*.py linguist-detectable=true *.html linguist-detectable=false *.css linguist-detectable=false