we previously merged both BirdNET label files, not realising one had traditional and the other simplified Chinese, so split properly and have both Chinese variants now.
This commit is contained in:
@@ -3,7 +3,8 @@
|
||||
| Afrikaans | 801 | 11.3% |
|
||||
| Arabic | 2087 | 29.6% |
|
||||
| Catalan | 6773 | 96.0% |
|
||||
| Chinese | 6393 | 90.6% |
|
||||
| Chinese (simplified) | 6210 | 88.0% |
|
||||
| Chinese (traditional) | 833 | 11.8% |
|
||||
| Croatian | 6033 | 85.5% |
|
||||
| Czech | 6100 | 86.4% |
|
||||
| Danish | 5986 | 84.8% |
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+3
-2
@@ -150,7 +150,7 @@ if(isset($_GET["latitude"])){
|
||||
$contents = preg_replace("/APPRISE_WEEKLY_REPORT=.*/", "APPRISE_WEEKLY_REPORT=$apprise_weekly_report", $contents);
|
||||
$contents = preg_replace("/IMAGE_PROVIDER=.*/", "IMAGE_PROVIDER=$image_provider", $contents);
|
||||
$contents = preg_replace("/FLICKR_API_KEY=.*/", "FLICKR_API_KEY=$flickr_api_key", $contents);
|
||||
if(strlen($language) == 2){
|
||||
if(strlen($language) == 2 || strlen($language) == 5){
|
||||
$contents = preg_replace("/DATABASE_LANG=.*/", "DATABASE_LANG=$language", $contents);
|
||||
}
|
||||
$contents = preg_replace("/INFO_SITE=.*/", "INFO_SITE=$info_site", $contents);
|
||||
@@ -525,7 +525,8 @@ https://discordapp.com/api/webhooks/{WebhookID}/{WebhookToken}
|
||||
"ar" => "Arabic",
|
||||
"ca" => "Catalan",
|
||||
"cs" => "Czech",
|
||||
"zh" => "Chinese",
|
||||
"zh_CN" => "Chinese (simplified)",
|
||||
"zh_TW" => "Chinese (traditional)",
|
||||
"hr" => "Croatian",
|
||||
"da" => "Danish",
|
||||
"nl" => "Dutch",
|
||||
|
||||
@@ -133,6 +133,11 @@ if ! grep -E '^IMAGE_PROVIDER=' /etc/birdnet/birdnet.conf &>/dev/null;then
|
||||
echo "IMAGE_PROVIDER=${PROVIDER}" >> /etc/birdnet/birdnet.conf
|
||||
fi
|
||||
|
||||
if grep -E '^DATABASE_LANG=zh$' /etc/birdnet/birdnet.conf &>/dev/null;then
|
||||
sed -i --follow-symlinks -E 's/^DATABASE_LANG=zh/DATABASE_LANG=zh_CN/' /etc/birdnet/birdnet.conf
|
||||
install_language_label.sh
|
||||
fi
|
||||
|
||||
[ -d $RECS_DIR/StreamData ] || sudo_with_user mkdir -p $RECS_DIR/StreamData
|
||||
[ -L ${EXTRACTED}/spectrogram.png ] || sudo_with_user ln -sf ${RECS_DIR}/StreamData/spectrogram.png ${EXTRACTED}/spectrogram.png
|
||||
|
||||
|
||||
@@ -9,9 +9,9 @@ key_lang = {'af': 'Afrikaans', 'ar': 'Arabic', 'ca': 'Catalan', 'cs': 'Czech', '
|
||||
'et': 'Estonian', 'fi': 'Finnish', 'fr': 'French', 'hr': 'Croatian', 'hu': 'Hungarian', 'id': 'Indonesian', 'is': 'Icelandic', 'it': 'Italian',
|
||||
'ja': 'Japanese', 'ko': 'Korean', 'lt': 'Lithuanian', 'lv': 'Latvian', 'nl': 'Dutch', 'no': 'Norwegian', 'pl': 'Polish', 'pt': 'Portuguese',
|
||||
'ro': 'Romanian', 'ru': 'Russian', 'sk': 'Slovak', 'sl': 'Slovenian', 'sr': 'Serbian', 'sv': 'Swedish', 'th': 'Thai', 'tr': 'Turkish',
|
||||
'uk': 'Ukrainian', 'vi': 'Vietnamese', 'zh': 'Chinese'}
|
||||
'uk': 'Ukrainian', 'vi': 'Vietnamese', 'zh_CN': 'Chinese (simplified)', 'zh_TW': 'Chinese (traditional)'}
|
||||
languages = ['af', 'ar', 'ca', 'cs', 'da', 'de', 'en', 'es', 'et', 'fi', 'fr', 'hr', 'hu', 'id', 'is', 'it', 'ja',
|
||||
'ko', 'lt', 'lv', 'nl', 'no', 'pl', 'pt', 'ro', 'ru', 'sk', 'sl', 'sr', 'sv', 'th', 'tr', 'uk', 'vi', 'zh']
|
||||
'ko', 'lt', 'lv', 'nl', 'no', 'pl', 'pt', 'ro', 'ru', 'sk', 'sl', 'sr', 'sv', 'th', 'tr', 'uk', 'vi', 'zh_CN', 'zh_TW']
|
||||
|
||||
|
||||
def get_labels(model, language=None):
|
||||
|
||||
Reference in New Issue
Block a user