Skip to content

Commit be8c2b1

Browse files
committed
Rename API to append_from_text
The previous name makes no sense now that we only have one bundle.
1 parent 145bcd5 commit be8c2b1

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ func _init():
8585
8686
# Godot automatically converts spaces to tabs for multi-line strings, but tabs are invalid in
8787
# FTL syntax. So convert tabs to four spaces. Returns an error that you should handle.
88-
var err_inline = tr_inline.add_bundle_from_text("""
88+
var err_inline = tr_inline.append_from_text("""
8989
-term = email
9090
HELLO =
9191
{ $unreadEmails ->

godot/default/localization_test.gd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ func _init():
66
var tr_foldername = load("res://de/german-test.ftl")
77
var tr_inline = TranslationFluent.new()
88
tr_inline.locale = "pt_PT"
9-
var err_inline = tr_inline.add_bundle_from_text("""
9+
var err_inline = tr_inline.append_from_text("""
1010
-term = email
1111
HELLO =
1212
{ $unreadEmails ->

godot/forked/localization_test.gd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ func _init():
66
var tr_foldername = load("res://de/german-test.ftl")
77
var tr_inline = TranslationFluent.new()
88
tr_inline.locale = "pt_PT"
9-
var err_inline = tr_inline.add_bundle_from_text("""
9+
var err_inline = tr_inline.append_from_text("""
1010
-term = email
1111
HELLO =
1212
{ $unreadEmails ->

rust/src/fluent/importer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ impl IResourceFormatLoader for ResourceFormatLoaderFluent {
7373
}
7474
}
7575

76-
let err = translation.bind_mut().add_bundle_from_text(text.to_string());
76+
let err = translation.bind_mut().append_from_text(text.to_string());
7777
if err != GdErr::OK {
7878
return err.ord().to_variant();
7979
}

rust/src/fluent/translation.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ impl TranslationFluent {
233233
}
234234

235235
#[func]
236-
pub fn add_bundle_from_text(&mut self, text: String) -> GdErr {
236+
pub fn append_from_text(&mut self, text: String) -> GdErr {
237237
let bundle = match &mut self.bundle {
238238
Some(bundle) => bundle,
239239
None => &mut {

0 commit comments

Comments
 (0)