From 562103c66dc3666e470a314f1ffe83ab83790842 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Fri, 15 Dec 2017 12:25:46 +0100 Subject: [PATCH] Use tab as value separator --- compiler/error/compiler.py | 2 +- compiler/error/source/303_SEE_OTHER.csv | 10 +-- compiler/error/source/400_BAD_REQUEST.csv | 64 +++++++++---------- compiler/error/source/401_UNAUTHORIZED.csv | 18 +++--- compiler/error/source/420_FLOOD.csv | 4 +- .../source/500_INTERNAL_SERVER_ERROR.csv | 4 +- 6 files changed, 51 insertions(+), 51 deletions(-) diff --git a/compiler/error/compiler.py b/compiler/error/compiler.py index 3d8f6569..49f3359b 100644 --- a/compiler/error/compiler.py +++ b/compiler/error/compiler.py @@ -74,7 +74,7 @@ def start(): with open("{}/source/{}".format(home, i)) as f_csv, \ open("{}/{}_{}.py".format(dest, name.lower(), code), "w") as f_class: - reader = csv.reader(f_csv, delimiter="|") + reader = csv.reader(f_csv, delimiter="\t") super_class = caml(name) name = " ".join([str(i.capitalize()) for i in re.sub(r"_", " ", name).lower().split(" ")]) diff --git a/compiler/error/source/303_SEE_OTHER.csv b/compiler/error/source/303_SEE_OTHER.csv index 65df560f..da3ac18d 100644 --- a/compiler/error/source/303_SEE_OTHER.csv +++ b/compiler/error/source/303_SEE_OTHER.csv @@ -1,5 +1,5 @@ -id|message -FILE_MIGRATE_X|The file to be accessed is currently stored in DC{x} -PHONE_MIGRATE_X|The phone number a user is trying to use for authorization is associated with DC{x} -NETWORK_MIGRATE_X|The source IP address is associated with DC{x} (for registration) -USER_MIGRATE_X|The user whose identity is being used to execute queries is associated with DC{x} (for registration) +id message +FILE_MIGRATE_X The file to be accessed is currently stored in DC{x} +PHONE_MIGRATE_X The phone number a user is trying to use for authorization is associated with DC{x} +NETWORK_MIGRATE_X The source IP address is associated with DC{x} (for registration) +USER_MIGRATE_X The user whose identity is being used to execute queries is associated with DC{x} (for registration) diff --git a/compiler/error/source/400_BAD_REQUEST.csv b/compiler/error/source/400_BAD_REQUEST.csv index 940d2837..8d3d9089 100644 --- a/compiler/error/source/400_BAD_REQUEST.csv +++ b/compiler/error/source/400_BAD_REQUEST.csv @@ -1,32 +1,32 @@ -id|message -FIRSTNAME_INVALID|The first name is invalid -LASTNAME_INVALID|The last name is invalid -PHONE_NUMBER_INVALID|The phone number is invalid -PHONE_CODE_HASH_EMPTY|phone_code_hash is missing -PHONE_CODE_EMPTY|phone_code is missing -PHONE_CODE_EXPIRED|The confirmation code has expired -PHONE_CODE_INVALID|The confirmation code is invalid -API_ID_INVALID|The api_id/api_hash combination is invalid -PHONE_NUMBER_OCCUPIED|The phone number is already in use -PHONE_NUMBER_UNOCCUPIED|The phone number is not yet being used -USERS_TOO_FEW|Not enough users (to create a chat, for example) -USERS_TOO_MUCH|The maximum number of users has been exceeded (to create a chat, for example) -TYPE_CONSTRUCTOR_INVALID|The type constructor is invalid -FILE_PART_INVALID|The file part number is invalid -FILE_PARTS_INVALID|The number of file parts is invalid -FILE_PART_X_MISSING|Part {x} of the file is missing from storage -MD5_CHECKSUM_INVALID|The MD5 checksums do not match -PHOTO_INVALID_DIMENSIONS|The photo dimensions are invalid -FIELD_NAME_INVALID|The field with the name FIELD_NAME is invalid -FIELD_NAME_EMPTY|The field with the name FIELD_NAME is missing -MSG_WAIT_FAILED|A waiting call returned an error -PEER_ID_INVALID|The id/access_hash combination is invalid -MESSAGE_EMPTY|The message sent is empty -ENCRYPTED_MESSAGE_INVALID|The special binding message (bind_auth_key_inner) contains invalid data -INPUT_METHOD_INVALID|The method called is invalid -PASSWORD_HASH_INVALID|Two-step verification password is invalid -USERNAME_NOT_OCCUPIED|The username is not occupied by anyone -USERNAME_INVALID|The username is invalid -MESSAGE_ID_INVALID|The message id is invalid -MESSAGE_NOT_MODIFIED|The message was not modified -ENTITY_MENTION_USER_INVALID|The mentioned entity is not an user \ No newline at end of file +id message +FIRSTNAME_INVALID The first name is invalid +LASTNAME_INVALID The last name is invalid +PHONE_NUMBER_INVALID The phone number is invalid +PHONE_CODE_HASH_EMPTY phone_code_hash is missing +PHONE_CODE_EMPTY phone_code is missing +PHONE_CODE_EXPIRED The confirmation code has expired +PHONE_CODE_INVALID The confirmation code is invalid +API_ID_INVALID The api_id/api_hash combination is invalid +PHONE_NUMBER_OCCUPIED The phone number is already in use +PHONE_NUMBER_UNOCCUPIED The phone number is not yet being used +USERS_TOO_FEW Not enough users (to create a chat, for example) +USERS_TOO_MUCH The maximum number of users has been exceeded (to create a chat, for example) +TYPE_CONSTRUCTOR_INVALID The type constructor is invalid +FILE_PART_INVALID The file part number is invalid +FILE_PARTS_INVALID The number of file parts is invalid +FILE_PART_X_MISSING Part {x} of the file is missing from storage +MD5_CHECKSUM_INVALID The MD5 checksums do not match +PHOTO_INVALID_DIMENSIONS The photo dimensions are invalid +FIELD_NAME_INVALID The field with the name FIELD_NAME is invalid +FIELD_NAME_EMPTY The field with the name FIELD_NAME is missing +MSG_WAIT_FAILED A waiting call returned an error +PEER_ID_INVALID The id/access_hash combination is invalid +MESSAGE_EMPTY The message sent is empty +ENCRYPTED_MESSAGE_INVALID The special binding message (bind_auth_key_inner) contains invalid data +INPUT_METHOD_INVALID The method called is invalid +PASSWORD_HASH_INVALID Two-step verification password is invalid +USERNAME_NOT_OCCUPIED The username is not occupied by anyone +USERNAME_INVALID The username is invalid +MESSAGE_ID_INVALID The message id is invalid +MESSAGE_NOT_MODIFIED The message was not modified +ENTITY_MENTION_USER_INVALID The mentioned entity is not an user \ No newline at end of file diff --git a/compiler/error/source/401_UNAUTHORIZED.csv b/compiler/error/source/401_UNAUTHORIZED.csv index 69cf56f7..54b24dd7 100644 --- a/compiler/error/source/401_UNAUTHORIZED.csv +++ b/compiler/error/source/401_UNAUTHORIZED.csv @@ -1,9 +1,9 @@ -id|message -AUTH_KEY_UNREGISTERED|The key is not registered in the system -AUTH_KEY_INVALID|The key is invalid -USER_DEACTIVATED|The user has been deleted/deactivated -SESSION_REVOKED|The authorization has been invalidated, because of the user terminating all sessions -SESSION_EXPIRED|The authorization has expired -ACTIVE_USER_REQUIRED|The method is only available to already activated users -AUTH_KEY_PERM_EMPTY|The method is unavailable for temporary authorization key, not bound to permanent -SESSION_PASSWORD_NEEDED|Two-step verification password required +id message +AUTH_KEY_UNREGISTERED The key is not registered in the system +AUTH_KEY_INVALID The key is invalid +USER_DEACTIVATED The user has been deleted/deactivated +SESSION_REVOKED The authorization has been invalidated, because of the user terminating all sessions +SESSION_EXPIRED The authorization has expired +ACTIVE_USER_REQUIRED The method is only available to already activated users +AUTH_KEY_PERM_EMPTY The method is unavailable for temporary authorization key, not bound to permanent +SESSION_PASSWORD_NEEDED Two-step verification password required diff --git a/compiler/error/source/420_FLOOD.csv b/compiler/error/source/420_FLOOD.csv index 4674efda..bf404156 100644 --- a/compiler/error/source/420_FLOOD.csv +++ b/compiler/error/source/420_FLOOD.csv @@ -1,2 +1,2 @@ -id|message -FLOOD_WAIT_X|A wait of {x} seconds is required +id message +FLOOD_WAIT_X A wait of {x} seconds is required diff --git a/compiler/error/source/500_INTERNAL_SERVER_ERROR.csv b/compiler/error/source/500_INTERNAL_SERVER_ERROR.csv index 98a519fb..4ee4f042 100644 --- a/compiler/error/source/500_INTERNAL_SERVER_ERROR.csv +++ b/compiler/error/source/500_INTERNAL_SERVER_ERROR.csv @@ -1,2 +1,2 @@ -id|message -AUTH_RESTART|User authorization has restarted +id message +AUTH_RESTART User authorization has restarted