Capture accumulated application, UI, CLI, regression tests and design documentation changes, including task project mapping and default CalDAV list naming. Keep deployment data, backups, local credentials and build artifacts out of Git. Move the Compose enrollment token to an ignored local environment file.
45 lines
952 B
Go
45 lines
952 B
Go
package server
|
|
|
|
import "testing"
|
|
|
|
func TestTranslationsHaveMatchingKeys(t *testing.T) {
|
|
english := translations["en"]
|
|
japanese := translations["ja"]
|
|
|
|
for key := range english {
|
|
if _, ok := japanese[key]; !ok {
|
|
t.Errorf("Japanese translation is missing %q", key)
|
|
}
|
|
}
|
|
|
|
for key := range japanese {
|
|
if _, ok := english[key]; !ok {
|
|
t.Errorf("English translation is missing %q", key)
|
|
}
|
|
}
|
|
}
|
|
|
|
func TestEditorJapaneseLabelsAreLocalized(t *testing.T) {
|
|
keys := []string{
|
|
"editor.save",
|
|
"editor.rename",
|
|
"editor.history",
|
|
"editor.delete",
|
|
"editor.links",
|
|
"editor.close",
|
|
"editor.use_html",
|
|
"editor.use_markdown",
|
|
"editor.hide_preview",
|
|
"editor.show_preview",
|
|
}
|
|
|
|
for _, key := range keys {
|
|
if translations["ja"][key] == "" {
|
|
t.Errorf("Japanese translation is empty for %q", key)
|
|
}
|
|
if translations["ja"][key] == translations["en"][key] {
|
|
t.Errorf("Japanese translation was not localized for %q", key)
|
|
}
|
|
}
|
|
}
|