BobStore/app/src/full/java/kellinwood/security/zipsigner/DefaultResourceAdapter.java
Hans-Christoph Steiner ea80704598 split up everything into 'full' and 'basic' build flavor
"full" is the original F-Droid app with all the features.  It should still
build the exact same app after this change.  "basic" is the smallest
version of F-Droid possible.  It does not yet build, nor work.
2018-06-15 23:27:03 +02:00

37 lines
1.3 KiB
Java

package kellinwood.security.zipsigner;
import java.util.Locale;
/**
* Default resource adapter.
*/
public class DefaultResourceAdapter implements ResourceAdapter {
@Override
public String getString(Item item, Object... args) {
switch (item) {
case INPUT_SAME_AS_OUTPUT_ERROR:
return "Input and output files are the same. Specify a different name for the output.";
case AUTO_KEY_SELECTION_ERROR:
return "Unable to auto-select key for signing " + args[0];
case LOADING_CERTIFICATE_AND_KEY:
return "Loading certificate and private key";
case PARSING_CENTRAL_DIRECTORY:
return "Parsing the input's central directory";
case GENERATING_MANIFEST:
return "Generating manifest";
case GENERATING_SIGNATURE_FILE:
return "Generating signature file";
case GENERATING_SIGNATURE_BLOCK:
return "Generating signature block file";
case COPYING_ZIP_ENTRY:
return String.format(Locale.ENGLISH, "Copying zip entry %d of %d", args[0], args[1]);
default:
throw new IllegalArgumentException("Unknown item " + item);
}
}
}