Refactoring, new translations, cleaning up warnings.

Refactored to standard Maven layout:
src/main/java
src/main/resources
src/test/java
etc.

New translation code that uses locale-specific ResourceBundles
to load translations on demand.

Reworked API error/exceptions code to a shorter, simpler
@ApiErrors annotation. Processing of @ApiErrors annotations
produces an example for each possible API error and includes
API error string in HTTP response code, e.g.
400 INVALID_SIGNATURE
Missing API error cases added to each API call.

Translation of openAPI.json removed (for now).

block-explorer.html and BIP39 wordlists now read as resources
instead of direct from disk.

Java compile warnings fixed.
Some runtime warnings remain:

WARNING: A provider api.resource.ApiDefinition registered in SERVER runtime does not implement any provider interfaces applicable in the SERVER runtime.
WARNING: A provider api.resource.AnnotationPostProcessor registered in SERVER runtime does not implement any provider interfaces applicable in the SERVER runtime.
WARN org.reflections.Reflections - given scan urls are empty. set urls in the configuration
This commit is contained in:
catbref
2018-12-21 11:14:16 +00:00
parent aab6b69da1
commit c4ed4b378c
284 changed files with 835 additions and 2781 deletions

View File

@@ -0,0 +1,72 @@
UNKNOWN=Unbekannter Fehler
JSON=JSON Nachricht konnte nicht geparsed werden
NO_BALANCE=Guthaben ungenügend
NOT_YET_RELEASED=Feature wurde noch nicht veröffentlicht
INVALID_SIGNATURE=Ungültige Signatur
INVALID_ADDRESS=Ungültige Adresse
INVALID_SEED=Ungültiger Seed
INVALID_AMOUNT=Ungültiger Betrag
INVALID_FEE=Ungültige Gebühr
INVALID_SENDER=Ungültiger Sender
INVALID_RECIPIENT=Ungültiger Empfänger
INVALID_NAME_LENGTH=Ungültige Namenslänge
INVALID_VALUE_LENGTH=Ungültige Wertlänge
INVALID_NAME_OWNER=Ungültiger Namensbesitzer
INVALID_BUYER=Ungültiger Käufer
INVALID_PUBLIC_KEY=Ungültiger Public Key
INVALID_OPTIONS_LENGTH=Ungültige Optionen-Länge
INVALID_OPTION_LENGTH=Ungültige Optionslänge
INVALID_DATA=Ungültige Daten
INVALID_DATA_LENGTH=Ungültige Datenlänge
INVALID_UPDATE_VALUE=Ungültiger Update-Wert
KEY_ALREADY_EXISTS=Der Schlüssel existiert bereits, Editieren ist deaktiviert
KEY_NOT_EXISTS=Der Schlüssel existiert nicht
LAST_KEY_IS_DEFAULT_KEY_ERROR=Du kannst den Schlüssel '${key}' nicht löschen, wenn er der einzige ist
FEE_LESS_REQUIRED=fee less required
WALLET_NOT_IN_SYNC=Das Wallet muss synchronisiert werden
INVALID_NETWORK_ADDRESS=Ungültige Netzwerkadresse
WALLET_NO_EXISTS=Das Wallet existiert nicht
WALLET_ADDRESS_NO_EXISTS=Die Adresse existiert nicht im Wallet
WALLET_LOCKED=Das Wallet ist abgeschlossen
WALLET_ALREADY_EXISTS=Das Wallet existiert bereits
WALLET_API_CALL_FORBIDDEN_BY_USER=Der Benutzer hat den API-Aufruf abgelehnt
BLOCK_NO_EXISTS=Der Block existiert nicht
TRANSACTION_NO_EXISTS=Die Transaktion existiert nicht
PUBLIC_KEY_NOT_FOUND=Public Key wurde nicht gefunden
NAME_NO_EXISTS=Der Name existiert nicht
NAME_ALREADY_EXISTS=Der Name existiert bereits
NAME_ALREADY_FOR_SALE=Der Name steht bereits zum Verkauf
NAME_NOT_LOWER_CASE=Der Name muss aus Kleinbuchstaben bestehen
NAME_SALE_NO_EXISTS=Namensverkauf existiert nicht
BUYER_ALREADY_OWNER=Der Käufer ist bereits Besitzer
POLL_NO_EXISTS=Die Abstimmung existiert nicht
POLL_ALREADY_EXISTS=Die Abstimmung existiert bereits
DUPLICATE_OPTION=Nicht alle Optionen sind eindeutig
POLL_OPTION_NO_EXISTS=Die option existiert nicht
ALREADY_VOTED_FOR_THAT_OPTION=Bereits für diese Option abgestimmt
INVALID_ASSET_ID=Ungültige Asset ID
NAME_NOT_REGISTERED=?NAME_NOT_REGISTERED?
NAME_FOR_SALE=?NAME_FOR_SALE?
NAME_WITH_SPACE=?NAME_WITH_SPACE?
INVALID_DESC_LENGTH=Ungültige Beschreibungslänge. Max. Länge ${MAX_LENGTH}
EMPTY_CODE=Der Code ist leer
DATA_SIZE=Ungültige Datenlänge
NULL_PAGES=Ungültige Seiten
INVALID_TYPE_LENGTH=Ungültige Typlänge
INVALID_TAGS_LENGTH=Ungültige Tag-Länge
INVALID_CREATION_BYTES=Fehler in Creation Bytes
BODY_EMPTY=invalid body it must not be empty
BLOG_DISABLED=Dieser Blog ist deaktiviert
NAME_NOT_OWNER=the creator address does not own the author name
TX_AMOUNT=the data size is too large - currently only ${BATCH_TX_AMOUNT} arbitrary transactions are allowed at once!
BLOG_ENTRY_NO_EXISTS=transaction with this signature contains no entries!
BLOG_EMPTY=this blog is empty
POSTID_EMPTY=the attribute postid is empty! this is the signature of the post you want to comment
POST_NOT_EXISTING=for the given postid no blogpost to comment was found
COMMENTING_DISABLED=commenting is for this blog disabled
COMMENT_NOT_EXISTING=for the given signature no comment was found
INVALID_COMMENT_OWNER=invalid comment owner
MESSAGE_FORMAT_NOT_HEX=the Message format is not hex - correct the text or use isTextMessage = true
MESSAGE_BLANK=The message attribute is missing or content is blank
NO_PUBLIC_KEY=The recipient has not yet performed any action in the blockchain.\nYou can't send an encrypted message to him.
MESSAGESIZE_EXCEEDED=Message size exceeded!

View File

@@ -0,0 +1,95 @@
# Keys are from api.ApiError enum
# Common
UNKNOWN=unknown error
JSON=failed to parse json message
NO_BALANCE=not enough balance
NOT_YET_RELEASED=that feature is not yet released
UNAUTHORIZED=api call unauthorized
REPOSITORY_ISSUE=repository error
# Validation
INVALID_SIGNATURE=invalid signature
INVALID_ADDRESS=invalid address
INVALID_SEED=invalid seed
INVALID_AMOUNT=invalid amount
INVALID_FEE=invalid fee
INVALID_SENDER=invalid sender
INVALID_RECIPIENT=invalid recipient
INVALID_NAME_LENGTH=invalid name length
INVALID_VALUE_LENGTH=invalid value length
INVALID_NAME_OWNER=invalid name owner
INVALID_BUYER=invalid buyer
INVALID_PUBLIC_KEY=invalid public key
INVALID_OPTIONS_LENGTH=invalid options length
INVALID_OPTION_LENGTH=invalid option length
INVALID_DATA=invalid data
INVALID_DATA_LENGTH=invalid data length
INVALID_UPDATE_VALUE=invalid update value
KEY_ALREADY_EXISTS=key already exists, edit is false
KEY_NOT_EXISTS=the key does not exist
FEE_LESS_REQUIRED=fee less required
WALLET_NOT_IN_SYNC=wallet needs to be synchronized
INVALID_NETWORK_ADDRESS=invalid network address
ADDRESS_NO_EXISTS=account address does not exist
INVALID_CRITERIA=invalid search criteria
# Wallet
WALLET_NO_EXISTS=wallet does not exist
WALLET_ADDRESS_NO_EXISTS=address does not exist in wallet
WALLET_LOCKED=wallet is locked
WALLET_ALREADY_EXISTS=wallet already exists
WALLET_API_CALL_FORBIDDEN_BY_USER=wallet denied api call
# Blocks
BLOCK_NO_EXISTS=block does not exist
# Transactions
TRANSACTION_NO_EXISTS=transaction does not exist
PUBLIC_KEY_NOT_FOUND=public key not found
# Names
NAME_NO_EXISTS=name does not exist
NAME_ALREADY_EXISTS=name already exists
NAME_ALREADY_FOR_SALE=name already for sale
NAME_NOT_LOWER_CASE=name must be lower case
NAME_SALE_NO_EXISTS=namesale does not exist
BUYER_ALREADY_OWNER=buyer is already owner
# Voting
POLL_NO_EXISTS=poll does not exist
POLL_ALREADY_EXISTS=poll already exists
DUPLICATE_OPTION=not all options are unique
POLL_OPTION_NO_EXISTS=option does not exist
ALREADY_VOTED_FOR_THAT_OPTION=already voted for that option
# Assets
INVALID_ASSET_ID=invalid asset id
INVALID_ORDER_ID=invalid asset order id
ORDER_NO_EXISTS=unknown asset order id
# ATs
EMPTY_CODE=code is empty
DATA_SIZE=invalid data length
NULL_PAGES=invalid pages
INVALID_TYPE_LENGTH=invalid type length
INVALID_TAGS_LENGTH=invalid tags length
INVALID_CREATION_BYTES=error in creation bytes
# Blogs/Name-storage
BODY_EMPTY=invalid body it must not be empty
BLOG_DISABLED=this blog is disabled
NAME_NOT_OWNER=the creator address does not own the author name
BLOG_ENTRY_NO_EXISTS=transaction with this signature contains no entries!
BLOG_EMPTY=this blog is empty
POSTID_EMPTY=the attribute postid is empty! this is the signature of the post you want to comment
POST_NOT_EXISTING=for the given postid no blogpost to comment was found
COMMENTING_DISABLED=commenting is for this blog disabled
COMMENT_NOT_EXISTING=for the given signature no comment was found
INVALID_COMMENT_OWNER=invalid comment owner
# Messages
MESSAGE_FORMAT_NOT_HEX=the Message format is not hex - correct the text or use isTextMessage = true
MESSAGE_BLANK=The message attribute is missing or content is blank
NO_PUBLIC_KEY=The recipient has not yet performed any action in the blockchain.\nYou can't send an encrypted message to them.
MESSAGESIZE_EXCEEDED=Message size exceeded!

View File

@@ -0,0 +1,42 @@
OK=OK
INVALID_ADDRESS=INVALID_ADDRESS
NEGATIVE_AMOUNT=NEGATIVE_AMOUNT
NEGATIVE_FEE=NEGATIVE_FEE
NO_BALANCE=NO_BALANCE
INVALID_REFERENCE=INVALID_REFERENCE
INVALID_NAME_LENGTH=INVALID_NAME_LENGTH
INVALID_VALUE_LENGTH=INVALID_VALUE_LENGTH
NAME_ALREADY_REGISTERED=NAME_ALREADY_REGISTERED
NAME_DOES_NOT_EXIST=NAME_DOES_NOT_EXIST
INVALID_NAME_OWNER=INVALID_NAME_OWNER
NAME_ALREADY_FOR_SALE=NAME_ALREADY_FOR_SALE
NAME_NOT_FOR_SALE=NAME_NOT_FOR_SALE
BUYER_ALREADY_OWNER=BUYER_ALREADY_OWNER
INVALID_AMOUNT=INVALID_AMOUNT
INVALID_SELLER=INVALID_SELLER
NAME_NOT_LOWER_CASE=NAME_NOT_LOWER_CASE
INVALID_DESCRIPTION_LENGTH=INVALID_DESCRIPTION_LENGTH
INVALID_OPTIONS_COUNT=INVALID_OPTIONS_COUNT
INVALID_OPTION_LENGTH=INVALID_OPTION_LENGTH
DUPLICATE_OPTION=DUPLICATE_OPTION
POLL_ALREADY_EXISTS=POLL_ALREADY_EXISTS
POLL_DOES_NOT_EXIST=POLL_DOES_NOT_EXIST
POLL_OPTION_DOES_NOT_EXIST=POLL_OPTION_DOES_NOT_EXIST
ALREADY_VOTED_FOR_THAT_OPTION=ALREADY_VOTED_FOR_THAT_OPTION
INVALID_DATA_LENGTH=INVALID_DATA_LENGTH
INVALID_QUANTITY=INVALID_QUANTITY
ASSET_DOES_NOT_EXIST=ASSET_DOES_NOT_EXIST
INVALID_RETURN=INVALID_RETURN
HAVE_EQUALS_WANT=HAVE_EQUALS_WANT
ORDER_DOES_NOT_EXIST=ORDER_DOES_NOT_EXIST
INVALID_ORDER_CREATOR=INVALID_ORDER_CREATOR
INVALID_PAYMENTS_COUNT=INVALID_PAYMENTS_COUNT
NEGATIVE_PRICE=NEGATIVE_PRICE
INVALID_CREATION_BYTES=INVALID_CREATION_BYTES
INVALID_TAGS_LENGTH=INVALID_TAGS_LENGTH
INVALID_AT_TYPE_LENGTH=INVALID_AT_TYPE_LENGTH
INVALID_AT_TRANSACTION=INVALID_AT_TRANSACTION
AT_IS_FINISHED=AT_IS_FINISHED
ASSET_DOES_NOT_MATCH_AT=ASSET_DOES_NOT_MATCH_AT
ASSET_ALREADY_EXISTS=ASSET_ALREADY_EXISTS
NOT_YET_RELEASED=NOT_YET_RELEASED