feat: feat: add multilingual output support for commit, tag, and changelog commands
This commit is contained in:
@@ -391,6 +391,46 @@ impl ConfigManager {
|
||||
self.modified = true;
|
||||
}
|
||||
|
||||
// Language configuration
|
||||
|
||||
/// Get output language
|
||||
pub fn output_language(&self) -> &str {
|
||||
&self.config.language.output_language
|
||||
}
|
||||
|
||||
/// Set output language
|
||||
pub fn set_output_language(&mut self, language: String) {
|
||||
self.config.language.output_language = language;
|
||||
self.modified = true;
|
||||
}
|
||||
|
||||
/// Get language enum from config
|
||||
pub fn get_language(&self) -> Option<super::Language> {
|
||||
super::Language::from_str(&self.config.language.output_language)
|
||||
}
|
||||
|
||||
/// Check if commit types should be kept in English
|
||||
pub fn keep_types_english(&self) -> bool {
|
||||
self.config.language.keep_types_english
|
||||
}
|
||||
|
||||
/// Set keep types English flag
|
||||
pub fn set_keep_types_english(&mut self, keep: bool) {
|
||||
self.config.language.keep_types_english = keep;
|
||||
self.modified = true;
|
||||
}
|
||||
|
||||
/// Check if changelog types should be kept in English
|
||||
pub fn keep_changelog_types_english(&self) -> bool {
|
||||
self.config.language.keep_changelog_types_english
|
||||
}
|
||||
|
||||
/// Set keep changelog types English flag
|
||||
pub fn set_keep_changelog_types_english(&mut self, keep: bool) {
|
||||
self.config.language.keep_changelog_types_english = keep;
|
||||
self.modified = true;
|
||||
}
|
||||
|
||||
/// Export configuration to TOML string
|
||||
pub fn export(&self) -> Result<String> {
|
||||
toml::to_string_pretty(&self.config)
|
||||
|
||||
Reference in New Issue
Block a user