<?xml version="1.0" encoding="utf-8"?>
<!-- Novus example app - Android string-resource escaping and markup edge cases (res/values/).

     Everything in this file is a rule the aapt2 resource compiler enforces and a hand-written
     strings.xml routinely gets wrong. -->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2" xmlns:tools="http://schemas.android.com/tools">

    <!-- An apostrophe MUST be backslash-escaped (or the whole value wrapped in double quotes) or
         aapt2 fails the build with "Unescaped apostrophe in string". -->
    <string name="cannot_open">Can\'t open that folder</string>
    <string name="quoted_alternative">"Can't open that folder either"</string>

    <!-- Leading and trailing whitespace is stripped unless the value is quoted. -->
    <string name="stripped">   collapses to a single word   </string>
    <string name="preserved">"   keeps three leading spaces"</string>

    <!-- A literal double quote is escaped; @ and ? at the start of a value are escaped so they
         are not read as a resource or attribute reference. -->
    <string name="literal_quote">Wrote \"%1$s\" to disk</string>
    <string name="literal_at">\@novus mentions you</string>
    <string name="literal_question">\?? is not an attribute reference</string>

    <!-- Placeholders that must not be translated or reordered are wrapped in <xliff:g>, which
         translation tools treat as opaque. `example` shows the translator what goes there. -->
    <string name="move_confirm">Move <xliff:g id="source" example="report.pdf">%1$s</xliff:g> to <xliff:g id="destination" example="Archive">%2$s</xliff:g>?</string>

    <!-- Inline markup has to be CDATA-wrapped to survive as HTML rather than being flattened. -->
    <string name="terms"><![CDATA[Read the <b>terms</b> and our <a href="https://example.invalid/privacy">privacy notice</a>.]]></string>

    <!-- formatted="false" turns off the positional-argument check for a string that uses bare %s
         more than once; translatable="false" keeps a value out of the translation export. -->
    <string name="legacy_format" formatted="false">%s of %s</string>
    <string name="brand" translatable="false">Novus</string>

    <!-- Non-breaking space as a numeric entity, and an escaped newline/tab. -->
    <string name="price">12&#160;345,60&#160;z\u0142</string>
    <string name="two_lines">First line\nSecond line</string>
    <string name="tabbed">Name\tSize</string>

    <!-- A string-array and an integer-array; note that arrays are NOT plurals and are not
         quantity-aware. -->
    <string-array name="sort_modes">
        <item>Name</item>
        <item>Size</item>
        <item>Date modified</item>
    </string-array>

    <!-- tools:ignore documents a deliberate lint exception rather than silencing it globally. -->
    <string name="untranslated_debug" tools:ignore="MissingTranslation">Debug build</string>
</resources>
