// Copyright © SixtyFPS GmbH // SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0 export component X { property t1: @tr("fo{}oo", 42px); // ^error{Cannot convert length to string. Divide by 1px to convert to a plain number} property t2: @tr("foo{0️⃣}bar", 45); // ^error{Invalid '\{...\}' placeholder in format string. The placeholder must be a number, or braces must be escaped with '\{\{' and '\}\}'} property t6: @tr("foo{", 45); // ^error{Unterminated placeholder in format string. '\{' must be escaped with '\{\{'} property t7: @tr("foo{bar", 45); // ^error{Unterminated placeholder in format string. '\{' must be escaped with '\{\{'} property t8: @tr("foo{bar}bar", 45); // ^error{Invalid '\{...\}' placeholder in format string. The placeholder must be a number, or braces must be escaped with '\{\{' and '\}\}'} property t9: @tr("foo{}bar"); // ^error{Format string contains 1 placeholders, but only 0 extra arguments were given} property t10: @tr("foo{}ba{}r", 42); // ^error{Format string contains 2 placeholders, but only 1 extra arguments were given} property t11: @tr("foo{65535}ba{2147483647}r"); // ^error{Invalid '\{...\}' placeholder in format string. The placeholder must be a number, or braces must be escaped with '\{\{' and '\}\}'} // ^^error{Format string contains 65536 placeholders, but only 0 extra arguments were given} property t12: @tr("foo{45}bar", 44); // ^error{Format string contains 46 placeholders, but only 1 extra arguments were given} property t13: @tr("foo{0}ba{}r", 44, 42); // ^error{Cannot mix positional and non-positional placeholder in format string} property t14: @tr("foo{}ba{1}r", 44, 42); // ^error{Cannot mix positional and non-positional placeholder in format string} property t15: @tr("fooba🥸{3}🥸r", 44, 42, 45); // ^error{Format string contains 4 placeholders, but only 3 extra arguments were given} property t16: @tr("foo{} {}ba{}r", 44, 42); // ^error{Format string contains 3 placeholders, but only 2 extra arguments were given} property t17: @tr("fo{}o}r", 44, 42); // ^error{Unescaped '\}' in format string. Escape '\}' with '\}\}'} property ctx: @tr("foo" => "fo{}or{}", 42px); // ^error{Cannot convert length to string. Divide by 1px to convert to a plain number} // ^^error{Format string contains 2 placeholders, but only 1 extra arguments were given} }