mirror of
https://github.com/lifegpc/msg-tool.git
synced 2026-06-08 13:58:50 +08:00
Add arguments to dump to m3t files without add quote in translated lines
This commit is contained in:
@@ -190,14 +190,14 @@ pub struct M3tDumper {}
|
||||
|
||||
impl M3tDumper {
|
||||
/// Dumps the messages in M3T format.
|
||||
pub fn dump(messages: &[Message]) -> String {
|
||||
pub fn dump(messages: &[Message], no_quote: bool) -> String {
|
||||
let mut result = String::new();
|
||||
for message in messages {
|
||||
if let Some(name) = &message.name {
|
||||
result.push_str(&format!("○ NAME: {}\n\n", name));
|
||||
}
|
||||
result.push_str(&format!("○ {}\n", message.message.replace("\n", "\\n")));
|
||||
if message.message.starts_with("「") {
|
||||
if !no_quote && message.message.starts_with("「") {
|
||||
result.push_str("● 「」\n\n");
|
||||
} else {
|
||||
result.push_str("●\n\n");
|
||||
|
||||
Reference in New Issue
Block a user