Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
blockly > utils > ayrıştırma > replaceMessageReferences
utils.parsing.replaceMessageReferences() işlevi
Bir ileti dizeyse iletideki dize tablosu başvurularını değiştirir. Örneğin, "%{bky_my_msg}" ve "%{BKY_MY_MSG}" her ikisi de Msg['MY_MSG'] içindeki değerle değiştirilecek.
İmza:
export declare function replaceMessageReferences(message: string | any): string;
Parametreler
Parametre |
Tür |
Açıklama |
mesaj |
dize | herhangi biri |
Mesaj; bu mesaj, dize tablosu başvuruları içeren bir dize olabilir. |
Şunu döndürür:
dize
Mesaj referanslarının bulunduğu dize değiştirildi.
Aksi belirtilmediği sürece bu sayfanın içeriği Creative Commons Atıf 4.0 Lisansı altında ve kod örnekleri Apache 2.0 Lisansı altında lisanslanmıştır. Ayrıntılı bilgi için Google Developers Site Politikaları'na göz atın. Java, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2025-07-25 UTC.
[[["Anlaması kolay","easyToUnderstand","thumb-up"],["Sorunumu çözdü","solvedMyProblem","thumb-up"],["Diğer","otherUp","thumb-up"]],[["İhtiyacım olan bilgiler yok","missingTheInformationINeed","thumb-down"],["Çok karmaşık / çok fazla adım var","tooComplicatedTooManySteps","thumb-down"],["Güncel değil","outOfDate","thumb-down"],["Çeviri sorunu","translationIssue","thumb-down"],["Örnek veya kod sorunu","samplesCodeIssue","thumb-down"],["Diğer","otherDown","thumb-down"]],["Son güncelleme tarihi: 2025-07-25 UTC."],[[["The `replaceMessageReferences` function substitutes string table references within a message string with their corresponding values from the `Msg` object."],["This function handles both \"%{bky_my_msg}\" and \"%{BKY_MY_MSG}\" formats, replacing them with the value of `Msg['MY_MSG']`."],["The function accepts a message, which can be a string potentially containing references or any other data type, and returns a string with references replaced."],["If the input message is not a string, it is returned unchanged."]]],[]]