net.i2p.util

## Class TranslateReader

- java.lang.Object
- - java.io.Reader
  - - java.io.FilterReader
    - - net.i2p.util.TranslateReader

- All Implemented Interfaces:
    Closeable, AutoCloseable, Readable

      public class TranslateReader
      extends FilterReader

  Translate. Strings are tagged with _("translateme") or _("translate {0} me", "foo") Max two parameters. String and parameters must be double-quoted (no ngettext, no tagged parameters). Escape quotes inside quote with \". Commas and spaces between args are optional. Entire tag (from '_' to ')') must be on one line. Multiple tags allowed on one line. Also will extract strings to a dummy java file for postprocessing by xgettext - see main().

- - ### Field Summary

    - ### Fields inherited from class java.io.FilterReader

      `in`

    - ### Fields inherited from class java.io.Reader

      `lock`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TranslateReader(I2PAppContext ctx, String bundle, InputStream in)`
    `TranslateReader(I2PAppContext ctx, String bundle, Reader in)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()`
    `static void` | `main(String[] args)` Do not comment out, used to extract tags as a part of the build process.
    `void` | `mark(int readLimit)`
    `boolean` | `markSupported()`
    `int` | `read()`
    `int` | `read(char[] cbuf, int off, int len)`
    `boolean` | `ready()`
    `void` | `reset()`
    `long` | `skip(long n)`

    - ### Methods inherited from class java.io.Reader

      `read, read`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### TranslateReader

          public TranslateReader(I2PAppContext ctx,
                                 String bundle,
                                 InputStream in)
                          throws IOException

      Parameters:
        `bundle` - may be null for tagging only
        `in` - UTF-8
      Throws:
        `IOException`

    - #### TranslateReader

          public TranslateReader(I2PAppContext ctx,
                                 String bundle,
                                 Reader in)
                          throws IOException

      Parameters:
        `bundle` - may be null for tagging only
      Throws:
        `IOException`

  - ### Method Detail

    - #### close

          public void close()
                     throws IOException

      Specified by:
        `close` in interface `Closeable`
      Specified by:
        `close` in interface `AutoCloseable`
      Overrides:
        `close` in class `FilterReader`
      Throws:
        `IOException`

    - #### main

          public static void main(String[] args)

      Do not comment out, used to extract tags as a part of the build process.

    - #### mark

          public void mark(int readLimit)

      Overrides:
        `mark` in class `FilterReader`

    - #### markSupported

          public boolean markSupported()

      Overrides:
        `markSupported` in class `FilterReader`

    - #### read

          public int read()
                   throws IOException

      Overrides:
        `read` in class `FilterReader`
      Throws:
        `IOException`

    - #### read

          public int read(char[] cbuf,
                          int off,
                          int len)
                   throws IOException

      Overrides:
        `read` in class `FilterReader`
      Throws:
        `IOException`

    - #### ready

          public boolean ready()
                        throws IOException

      Overrides:
        `ready` in class `FilterReader`
      Throws:
        `IOException`

    - #### reset

          public void reset()
                     throws IOException

      Overrides:
        `reset` in class `FilterReader`
      Throws:
        `IOException`

    - #### skip

          public long skip(long n)
                    throws IOException

      Overrides:
        `skip` in class `FilterReader`
      Throws:
        `IOException`