This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'json' | |
| languages = ["cs", "da", "de", "en", "es", "fi", "fr", "he", "hi", "it", "ja", "ko", "lt", "nl", "no", "pl", "pt", "ru", "sv", "th", "tr", "uk", "zh"] | |
| keyToSearch=ARGV[0] | |
| pathToSearch=ARGV[1] | |
| destinationPath=ARGV[2] | |
| puts "Start One App strings scripts..." | |
| puts "............................." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class ChatScreenPresenter { | |
| function formatChatMessage(message) { | |
| return `${message.sender}: ${message.content}`; | |
| } | |
| // ... more functions to format chat screen components | |
| } | |
| class CustomerDetailsScreenPresenter { | |
| function formatCustomerAddress(address) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class StringUtils { | |
| function formatChatMessage(message) { | |
| return `${message.sender}: ${message.content}`; | |
| } | |
| function removeEmptySpaces(stringWithSpaces) { | |
| return stringWithSpaces.replace(' ', ''); | |
| } | |
| function formatCustomerAddress(address) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| async function updateAdd(x) { | |
| const updateAddReq = ReqMaker.make(new UpdateAddRoute(x)); | |
| try { | |
| return await Sender.send(updateAddReq); | |
| } catch(e) | |
| throw new Error(e); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| async function onSaveCustomerDetailsPress() { | |
| const name = nameInput.getText(); | |
| const lastName = lastNameInput.getText(); | |
| if (name.length === 0 || lastName.length === 0) { | |
| const alert = new Alert.create('Please fill all fields'); | |
| alert.show(); | |
| } else { | |
| try { | |
| const request = new UpdateCustomerRequest(name, lastName); | |
| await RequestDispatcher.dispatch(request); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function onSaveCustomerDetailsPress() { | |
| const name = nameInput.getText(); | |
| const lastName = lastNameInput.getText(); | |
| if (!isInputValid(name, lastName)) { | |
| showAlert('Please fill all fields'); | |
| return; | |
| } | |
| saveCustomerDetails(name, lastName) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| async function updateAddress(customerId) { | |
| const updateAddressRoute = new UpdateAddressRoute(customerId); | |
| const UpdateAddressRequest = RequestBuilder.build(updateAddressRoute); | |
| try { | |
| return await RequestDispatcher.dispatch(UpdateAddressRequest); | |
| } catch(error) { | |
| throw new ApiRequestError(`Failed to update address for customer ${customerId}`, error); | |
| } | |
| } |