Enumerations

The following enumerations are available globally.

  • All possible errors that may be produced during a fetch (pull) or a push operation

    See more

    Declaration

    Swift

    public enum TXCDSError : Error
  • All possible warnings that may be produced when pushing strings to CDS.

    See more

    Declaration

    Swift

    public enum TXCDSWarning : Error
  • Update policy that specifies the way that the internal cache is updated with new translations.

    You can find an easy to understand table containing a number of cases and how each policy updates the cache below:

     | Key || Cache | New  || Replace All   | Update using Translated        |
     |-----||-------|------||---------------|--------------------------------|
     | a   || "a"   | -    || -             | "a"                            |
     | b   || "b"   | "B"  || "B"           | "B"                            |
     | c   || "c"   | ""   || ""            | "c"                            |
     | d   || ""    | -    || -             | ""                             |
     | e   || ""    | "E"  || "E"           | "E"                            |
     | f   || -     | "F"  || "F"           | "F"                            |
     | g   || -     | ""   || ""            | -                              |
    

    Here’s an example on how to read the table above:

    • Given a string with key="c"
    • and a cache that has "c" as the stored value for this key ("c" -> "c")
    • if an empty translation arrives for this string ("")
      • if policy is .replaceAll, then the cache will be updated so that ("c" -> "")
      • in contrast to that, if policy is .updateUsingTranslated, then the cache will stay as is ("c" -> "c"), because the new translation is empty.

    A "-" value means that the respective key does not exist. For example:

    • Given a string with key="f"
    • and a cache that has no entry with "f" as a key
    • if a translation arrives for this string ("f" -> "F")
      • if policy is .replaceAll, then the cache will be updated by adding a new entry so that ("f" -> "F")
      • if policy is .updateUsingTranslated, then the same will happen, since the new translation is not empty
    See more

    Declaration

    Swift

    @objc
    public enum TXCacheUpdatePolicy : Int
  • The rendering strategy to be used when Transifex renders the final string.

    See more

    Declaration

    Swift

    @objc
    public enum TXRenderingStategy : Int
  • Log levels used by TXStandardLogHandler to specify the severity of the logged message.

    See more

    Declaration

    Swift

    @objc
    public enum TXLogLevel : Int8