mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-11-16 23:04:24 +08:00
fix(i18n): use English runtime text and localize system UI
This commit is contained in:
@@ -11,6 +11,8 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
// These are persisted counter keys, not display labels. Keep existing keys
|
||||
// stable; the frontend translates their presentation independently.
|
||||
catImage = "图片"
|
||||
catVideo = "视频"
|
||||
catAudio = "音频"
|
||||
@@ -19,6 +21,11 @@ const (
|
||||
catOther = "其他"
|
||||
)
|
||||
|
||||
// Categories returns the legacy persistent category keys in display order.
|
||||
func Categories() []string {
|
||||
return []string{catImage, catVideo, catAudio, catDocument, catArchive, catOther}
|
||||
}
|
||||
|
||||
// GetFileCategory classifies a file by mime type and extension.
|
||||
func GetFileCategory(mimeType, ext string) string {
|
||||
mimeType = strings.ToLower(mimeType)
|
||||
|
||||
Reference in New Issue
Block a user