From 1d14e057ad734beaa473c169b7394f65348772e5 Mon Sep 17 00:00:00 2001 From: skywalker Date: Thu, 29 Aug 2024 23:57:06 +0300 Subject: [PATCH 1/2] feat(instrument-types): add localization --- client/src/generated/model/instrument-type.ts | 8 +++- client/src/pages/home/ui/Home.page.tsx | 38 +++++++++------- .../home/ui/styles/Home.page.module.scss | 1 - client/src/pages/instrument/api/loader.ts | 4 +- .../ui/RemoveInstrument.button.tsx | 4 +- .../src/shared/styles/dark-mode.module.scss | 2 +- .../ui/filters/InstrumentType.filter.tsx | 4 +- openapi/openapi.yml | 8 +++- openapi/specs/common/InstrumentType.yml | 9 ++-- server/.editorconfig | 3 ++ server/app/build.gradle.kts | 6 +-- .../kotlin/mu/muse/rest/dto/InstrumentType.kt | 9 ++-- .../application/muse/RestConfiguration.kt | 45 ++++++++++++++----- .../mu/muse/domain/instrument/Instrument.kt | 19 ++------ .../rest/favorite/ListFavoriteEndpoint.kt | 14 ++++-- .../instruments/CreateInstrumentEndpoint.kt | 2 +- .../instruments/EditInstrumentEndpoint.kt | 2 +- .../instruments/GetInstrumentByIdEndpoint.kt | 19 ++++++-- .../instruments/GetInstrumentTypesEndpoint.kt | 15 +++++-- .../GetInstrumentsByCriteriaEndpoint.kt | 10 ++++- ...tInstrumentsByCriteriaPaginatedEndpoint.kt | 20 +++++++-- .../src/main/resources/messages_en.properties | 3 ++ .../src/main/resources/messages_ru.properties | 3 ++ 23 files changed, 169 insertions(+), 79 deletions(-) create mode 100644 server/app/src/main/resources/messages_en.properties create mode 100644 server/app/src/main/resources/messages_ru.properties diff --git a/client/src/generated/model/instrument-type.ts b/client/src/generated/model/instrument-type.ts index edbd5b2e..4efe7d3e 100644 --- a/client/src/generated/model/instrument-type.ts +++ b/client/src/generated/model/instrument-type.ts @@ -23,5 +23,11 @@ export interface InstrumentType { * @type {string} * @memberof InstrumentType */ - instrument_type: string; + code: string; + /** + * + * @type {string} + * @memberof InstrumentType + */ + localized_text: string; } diff --git a/client/src/pages/home/ui/Home.page.tsx b/client/src/pages/home/ui/Home.page.tsx index 4da5a1c9..5151633d 100644 --- a/client/src/pages/home/ui/Home.page.tsx +++ b/client/src/pages/home/ui/Home.page.tsx @@ -15,20 +15,20 @@ import { useDarkMode } from "shared/dark-mode/use-dark-mode"; const images = [ { image: saxophone, - caption: "Saxophone" + caption: "Saxophone", }, { image: guitar, - caption: "Guitar" + caption: "Guitar", }, { image: rock_guitar, - caption: "Rock Guitar" + caption: "Rock Guitar", }, { image: violin, - caption: "Violin" - } + caption: "Violin", + }, ]; const trendingInstrumentsResponsiveSettings = [ @@ -36,16 +36,16 @@ const trendingInstrumentsResponsiveSettings = [ breakpoint: 571, settings: { slidesToShow: 3, - slidesToScroll: 1 - } + slidesToScroll: 1, + }, }, { breakpoint: 570, settings: { slidesToShow: 1, - slidesToScroll: 1 - } - } + slidesToScroll: 1, + }, + }, ]; export function HomePage() { @@ -58,10 +58,12 @@ export function HomePage() {
-
+
-

+

Why Choose Us for Your Musical Needs

-
+
We offer a wide range of high-quality instruments for all skill levels
@@ -87,7 +93,9 @@ export function HomePage() {
Enjoy competitive prices and exclusive deals on top brands
-

+

Trending Instruments

diff --git a/client/src/pages/home/ui/styles/Home.page.module.scss b/client/src/pages/home/ui/styles/Home.page.module.scss index b20337a5..48c83db1 100644 --- a/client/src/pages/home/ui/styles/Home.page.module.scss +++ b/client/src/pages/home/ui/styles/Home.page.module.scss @@ -37,7 +37,6 @@ color: #000000; } - .reason__h1 { color: #002244; margin: 1em 0; diff --git a/client/src/pages/instrument/api/loader.ts b/client/src/pages/instrument/api/loader.ts index c06031bb..a4814b17 100644 --- a/client/src/pages/instrument/api/loader.ts +++ b/client/src/pages/instrument/api/loader.ts @@ -27,7 +27,7 @@ export const loader: LoaderFunction = async ({ } const instrument = instrumentRequest.data; - const jwt = Jwt.extractFromCookie() + const jwt = Jwt.extractFromCookie(); if (jwt === null || jwt.expired()) { return { instrument: instrument, @@ -42,7 +42,7 @@ export const loader: LoaderFunction = async ({ }); if (listFavoriteRequest.status !== 200) { - throw new Error(`Failed to extract favorite list}`) + throw new Error(`Failed to extract favorite list}`); } const favoriteIds = listFavoriteRequest.data.content.map( diff --git a/client/src/shared/instrument-card-actions/ui/RemoveInstrument.button.tsx b/client/src/shared/instrument-card-actions/ui/RemoveInstrument.button.tsx index c8bd8ad8..ea4a8c9a 100644 --- a/client/src/shared/instrument-card-actions/ui/RemoveInstrument.button.tsx +++ b/client/src/shared/instrument-card-actions/ui/RemoveInstrument.button.tsx @@ -13,7 +13,7 @@ interface Props { setErrorModal: (errorModal: boolean) => void; } -const deleteInstrumentById = new DeleteInstrumentByIdApi(apiConfig) +const deleteInstrumentById = new DeleteInstrumentByIdApi(apiConfig); export const RemoveInstrumentButton = (props: Props) => { const { darkMode } = useDarkMode(); @@ -27,7 +27,7 @@ export const RemoveInstrumentButton = (props: Props) => { Authorization: `Bearer ${Jwt.extractFromCookie()!.toStringValue()}`, }, }, - ) + ); if (response.status === 200) { props.setSuccessModal(true); return; diff --git a/client/src/shared/styles/dark-mode.module.scss b/client/src/shared/styles/dark-mode.module.scss index 3fb90a77..fe60a430 100644 --- a/client/src/shared/styles/dark-mode.module.scss +++ b/client/src/shared/styles/dark-mode.module.scss @@ -4,4 +4,4 @@ //.text_dark_mode input::placeholder { // color: #ff; -//} \ No newline at end of file +//} diff --git a/client/src/widgets/catalogue-filter/ui/filters/InstrumentType.filter.tsx b/client/src/widgets/catalogue-filter/ui/filters/InstrumentType.filter.tsx index be6eefd6..6e11003c 100644 --- a/client/src/widgets/catalogue-filter/ui/filters/InstrumentType.filter.tsx +++ b/client/src/widgets/catalogue-filter/ui/filters/InstrumentType.filter.tsx @@ -41,9 +41,7 @@ export const InstrumentTypeFilter = (props: Props) => { return (
- - Type - + Type {instrumentTypes.map((instrumentType) => (
KEYBOARD - STRINGED.realName -> STRINGED - WIND.realName -> WIND - else -> throw IllegalArgumentException("Unknown value `${realNameValueRaw}") - } - } - } + enum class Type(val i18nCode: String) { + KEYBOARD(i18nCode = "instrument.type.keyboard"), + STRINGED(i18nCode = "instrument.type.stringed"), + WIND(i18nCode = "instrument.type.wind"); } } diff --git a/server/app/src/main/kotlin/mu/muse/rest/favorite/ListFavoriteEndpoint.kt b/server/app/src/main/kotlin/mu/muse/rest/favorite/ListFavoriteEndpoint.kt index 844c50b9..f660c27d 100644 --- a/server/app/src/main/kotlin/mu/muse/rest/favorite/ListFavoriteEndpoint.kt +++ b/server/app/src/main/kotlin/mu/muse/rest/favorite/ListFavoriteEndpoint.kt @@ -6,28 +6,36 @@ import mu.muse.rest.api.ListFavoriteApi import mu.muse.rest.dto.ListFavoriteResponse import mu.muse.rest.instruments.toDto import mu.muse.usecase.GetFavoriteByUsername +import org.springframework.context.MessageSource +import org.springframework.http.HttpHeaders import org.springframework.http.ResponseEntity import org.springframework.security.core.context.SecurityContextHolder import org.springframework.security.core.userdetails.UserDetails import org.springframework.web.bind.annotation.RestController +import org.springframework.web.context.request.RequestContextHolder +import org.springframework.web.context.request.ServletRequestAttributes +import java.util.Locale @RestController class ListFavoriteEndpoint( private val getFavoriteByUsername: GetFavoriteByUsername, + private val messageSource: MessageSource, ) : ListFavoriteApi { override fun listFavorite(): ResponseEntity { val principal = SecurityContextHolder.getContext().authentication.principal as UserDetails val username = Username.from(principal.username) val instruments = getFavoriteByUsername.execute(username) - return instruments.toResponse() + val request = (RequestContextHolder.getRequestAttributes() as ServletRequestAttributes).request + val locale = Locale.of(request.getHeader(HttpHeaders.ACCEPT_LANGUAGE)) ?: Locale.US + return instruments.toResponse(messageSource, locale) } } -fun List.toResponse(): ResponseEntity { +fun List.toResponse(messageSource: MessageSource, locale: Locale): ResponseEntity { return ResponseEntity.ok( ListFavoriteResponse( - content = this.map { it.toDto() }, + content = this.map { it.toDto(messageSource, locale) }, ), ) } diff --git a/server/app/src/main/kotlin/mu/muse/rest/instruments/CreateInstrumentEndpoint.kt b/server/app/src/main/kotlin/mu/muse/rest/instruments/CreateInstrumentEndpoint.kt index ad3e11f6..603939a6 100644 --- a/server/app/src/main/kotlin/mu/muse/rest/instruments/CreateInstrumentEndpoint.kt +++ b/server/app/src/main/kotlin/mu/muse/rest/instruments/CreateInstrumentEndpoint.kt @@ -24,7 +24,7 @@ class CreateInstrumentEndpoint( @RolesAllowed(Role.EDITOR) override fun createInstrument(request: CreateInstrumentRequestBody): ResponseEntity { val instrumentName = InstrumentName.from(request.instrumentDetail.instrumentName.instrumentName) - val instrumentType = Instrument.Type.valueOf(request.instrumentDetail.instrumentType.instrumentType) + val instrumentType = Instrument.Type.valueOf(request.instrumentDetail.instrumentType.code) val manufacturerType = ManufacturerType.from(request.instrumentDetail.manufacturerName.manufacturerName) val manufactureDate = ManufacturerDate.from(request.instrumentDetail.manufacturerDate.manufactureDate) val releaseDate = ReleaseDate.from(request.instrumentDetail.releaseDate.releaseDate) diff --git a/server/app/src/main/kotlin/mu/muse/rest/instruments/EditInstrumentEndpoint.kt b/server/app/src/main/kotlin/mu/muse/rest/instruments/EditInstrumentEndpoint.kt index f32ef9bf..9b4bb142 100644 --- a/server/app/src/main/kotlin/mu/muse/rest/instruments/EditInstrumentEndpoint.kt +++ b/server/app/src/main/kotlin/mu/muse/rest/instruments/EditInstrumentEndpoint.kt @@ -26,7 +26,7 @@ class EditInstrumentEndpoint( override fun editInstrument(request: EditInstrumentRequestBody): ResponseEntity { val instrumentId = InstrumentId.from(request.instrumentDetail.instrumentId.instrumentId) val instrumentName = InstrumentName.from(request.instrumentDetail.instrumentName.instrumentName) - val instrumentType = Instrument.Type.valueOf(request.instrumentDetail.instrumentType.instrumentType) + val instrumentType = Instrument.Type.valueOf(request.instrumentDetail.instrumentType.code) val manufacturerTypeName = ManufacturerType.valueOf(request.instrumentDetail.manufacturerName.manufacturerName) val manufacturerDate = ManufacturerDate.from(request.instrumentDetail.manufacturerDate.manufactureDate) val releaseDate = ReleaseDate.from(request.instrumentDetail.releaseDate.releaseDate) diff --git a/server/app/src/main/kotlin/mu/muse/rest/instruments/GetInstrumentByIdEndpoint.kt b/server/app/src/main/kotlin/mu/muse/rest/instruments/GetInstrumentByIdEndpoint.kt index cc38eed2..13207d62 100644 --- a/server/app/src/main/kotlin/mu/muse/rest/instruments/GetInstrumentByIdEndpoint.kt +++ b/server/app/src/main/kotlin/mu/muse/rest/instruments/GetInstrumentByIdEndpoint.kt @@ -15,27 +15,38 @@ import mu.muse.rest.dto.InstrumentType import mu.muse.rest.dto.ManufactureDate import mu.muse.rest.dto.ManufacturerName import mu.muse.usecase.GetInstrumentById +import org.springframework.context.MessageSource +import org.springframework.http.HttpHeaders import org.springframework.http.ResponseEntity import org.springframework.web.bind.annotation.RestController +import org.springframework.web.context.request.RequestContextHolder +import org.springframework.web.context.request.ServletRequestAttributes import java.time.LocalDate import java.time.ZoneId +import java.util.Locale @RestController class GetInstrumentByIdEndpoint( private val getInstrumentById: GetInstrumentById, + private val messageSource: MessageSource, ) : GetInstrumentByIdApi { override fun getInstrumentById(instrumentId: Long): ResponseEntity { val id = InstrumentId.from(instrumentId) val instrument = getInstrumentById.execute(id) - val instrumentDetail = instrument.toDto() + val request = (RequestContextHolder.getRequestAttributes() as ServletRequestAttributes).request + val locale = Locale.of(request.getHeader(HttpHeaders.ACCEPT_LANGUAGE)) + val instrumentDetail = instrument.toDto(messageSource, locale) return ResponseEntity.ok().body(instrumentDetail) } } fun InstrumentId.toDto() = mu.muse.rest.dto.InstrumentId(instrumentId = this.toLongValue()) fun InstrumentName.toDto() = mu.muse.rest.dto.InstrumentName(instrumentName = this.toStringValue()) -fun Instrument.Type.toDto() = InstrumentType(this.realName) +fun Instrument.Type.toDto(messageSource: MessageSource, locale: Locale) = InstrumentType( + code = this.name, + localizedText = messageSource.getMessage(this.i18nCode, null, locale), +) fun ManufacturerType.toDto() = ManufacturerName(this.realName) fun ManufacturerDate.toDto() = ManufactureDate(LocalDate.ofInstant(this.toInstantValue(), ZoneId.systemDefault())) fun ReleaseDate.toDto() = @@ -45,11 +56,11 @@ fun Country.toDto() = mu.muse.rest.dto.Country(country = this.realName) fun List.toDto() = this.map { BasicMaterial(basicMaterial = it.realName) } -fun Instrument.toDto(): InstrumentDetail { +fun Instrument.toDto(messageSource: MessageSource, locale: Locale): InstrumentDetail { return InstrumentDetail( instrumentId = this.id.toDto(), instrumentName = this.name.toDto(), - instrumentType = this.type.toDto(), + instrumentType = this.type.toDto(messageSource, locale), manufacturerName = this.manufacturerType.toDto(), manufacturerDate = this.manufactureDate.toDto(), releaseDate = this.releaseDate.toDto(), diff --git a/server/app/src/main/kotlin/mu/muse/rest/instruments/GetInstrumentTypesEndpoint.kt b/server/app/src/main/kotlin/mu/muse/rest/instruments/GetInstrumentTypesEndpoint.kt index 3cfa3ef8..92545d83 100644 --- a/server/app/src/main/kotlin/mu/muse/rest/instruments/GetInstrumentTypesEndpoint.kt +++ b/server/app/src/main/kotlin/mu/muse/rest/instruments/GetInstrumentTypesEndpoint.kt @@ -3,26 +3,33 @@ package mu.muse.rest.instruments import mu.muse.domain.instrument.Instrument import mu.muse.rest.api.GetInstrumentTypesApi import mu.muse.rest.dto.GetInstrumentTypesResponse -import mu.muse.rest.dto.InstrumentType import mu.muse.usecase.GetInstrumentTypes +import org.springframework.context.MessageSource +import org.springframework.http.HttpHeaders import org.springframework.http.ResponseEntity import org.springframework.web.bind.annotation.RestController +import org.springframework.web.context.request.RequestContextHolder +import org.springframework.web.context.request.ServletRequestAttributes +import java.util.Locale @RestController class GetInstrumentTypesEndpoint( private val getInstrumentTypes: GetInstrumentTypes, + private val messageSource: MessageSource, ) : GetInstrumentTypesApi { override fun getInstrumentTypes(): ResponseEntity { val instrumentTypes = getInstrumentTypes.execute() - return instrumentTypes.toRestResponse() + val request = (RequestContextHolder.getRequestAttributes() as ServletRequestAttributes).request + val locale = runCatching { Locale.of(request.getHeader(HttpHeaders.ACCEPT_LANGUAGE))}.getOrElse { Locale.US } + return instrumentTypes.toRestResponse(messageSource, locale) } } -fun List.toRestResponse(): ResponseEntity { +fun List.toRestResponse(messageSource: MessageSource, locale: Locale): ResponseEntity { return ResponseEntity.ok( GetInstrumentTypesResponse( - content = this.map { InstrumentType(it.realName) }, + content = this.map { it.toDto(messageSource, locale) }, ), ) } diff --git a/server/app/src/main/kotlin/mu/muse/rest/instruments/GetInstrumentsByCriteriaEndpoint.kt b/server/app/src/main/kotlin/mu/muse/rest/instruments/GetInstrumentsByCriteriaEndpoint.kt index c66b68e3..64a4572e 100644 --- a/server/app/src/main/kotlin/mu/muse/rest/instruments/GetInstrumentsByCriteriaEndpoint.kt +++ b/server/app/src/main/kotlin/mu/muse/rest/instruments/GetInstrumentsByCriteriaEndpoint.kt @@ -7,12 +7,18 @@ import mu.muse.rest.dto.GetInstrumentsByCriteriaRequestBody import mu.muse.rest.dto.GetInstrumentsByCriteriaResponse import mu.muse.rest.dto.InstrumentDetail import mu.muse.usecase.GetInstrumentsByCriteria +import org.springframework.context.MessageSource +import org.springframework.http.HttpHeaders import org.springframework.http.ResponseEntity import org.springframework.web.bind.annotation.RestController +import org.springframework.web.context.request.RequestContextHolder +import org.springframework.web.context.request.ServletRequestAttributes +import java.util.Locale @RestController class GetInstrumentsByCriteriaEndpoint( private val getInstrumentsByCriteria: GetInstrumentsByCriteria, + private val messageSource: MessageSource, ) : GetInstrumentsByCriteriaApi { override fun getInstrumentsByCriteria( @@ -20,7 +26,9 @@ class GetInstrumentsByCriteriaEndpoint( ): ResponseEntity { val criteria = request.toInstrumentCriteria() val instruments = getInstrumentsByCriteria.execute(criteria = criteria) - val instrumentsDto = instruments.map { it.toDto() } + val request = (RequestContextHolder.getRequestAttributes() as ServletRequestAttributes).request + val locale = runCatching { Locale.of(request.getHeader(HttpHeaders.ACCEPT_LANGUAGE)) }.getOrElse { Locale.US } + val instrumentsDto = instruments.map { it.toDto(messageSource, locale) } return ResponseEntity.ok(instrumentsDto.toRestResponse()) } } diff --git a/server/app/src/main/kotlin/mu/muse/rest/instruments/GetInstrumentsByCriteriaPaginatedEndpoint.kt b/server/app/src/main/kotlin/mu/muse/rest/instruments/GetInstrumentsByCriteriaPaginatedEndpoint.kt index 3518ca24..4a80b3d9 100644 --- a/server/app/src/main/kotlin/mu/muse/rest/instruments/GetInstrumentsByCriteriaPaginatedEndpoint.kt +++ b/server/app/src/main/kotlin/mu/muse/rest/instruments/GetInstrumentsByCriteriaPaginatedEndpoint.kt @@ -15,12 +15,18 @@ import mu.muse.rest.dto.GetInstrumentByCriteriaPageResponse import mu.muse.rest.dto.GetInstrumentsByCriteriaRequestBody import mu.muse.usecase.GetInstrumentsByCriteriaPaginated import mu.muse.usecase.access.instrument.InstrumentExtractor +import org.springframework.context.MessageSource +import org.springframework.http.HttpHeaders import org.springframework.http.ResponseEntity import org.springframework.web.bind.annotation.RestController +import org.springframework.web.context.request.RequestContextHolder +import org.springframework.web.context.request.ServletRequestAttributes +import java.util.Locale @RestController class GetInstrumentsByCriteriaPaginatedEndpoint( private val getInstrumentsByCriteriaPaginated: GetInstrumentsByCriteriaPaginated, + private val messageSource: MessageSource, ) : GetInstrumentsByCriteriaPaginatedApi { override fun getInstrumentsByCriteriaPaginated( @@ -30,6 +36,7 @@ class GetInstrumentsByCriteriaPaginatedEndpoint( ): ResponseEntity { val criteria = request.toInstrumentCriteria() + val pageRequest = PageRequest( pageSize = pageSize, pageNumber = pageNumber, @@ -40,8 +47,10 @@ class GetInstrumentsByCriteriaPaginatedEndpoint( pageRequest = pageRequest, ) + val request = (RequestContextHolder.getRequestAttributes() as ServletRequestAttributes).request + val locale = runCatching { Locale.of(request.getHeader(HttpHeaders.ACCEPT_LANGUAGE)) }.getOrElse { Locale.US } return ResponseEntity.ok( - instrumentsPaginated.toRestResponse(), + instrumentsPaginated.toRestResponse(messageSource, locale), ) } } @@ -49,7 +58,7 @@ class GetInstrumentsByCriteriaPaginatedEndpoint( fun GetInstrumentsByCriteriaRequestBody.toInstrumentCriteria(): InstrumentExtractor.Criteria { return InstrumentExtractor.Criteria( name = this.instrumentName?.let { InstrumentName.from(it.instrumentName) }, - types = this.instrumentTypes?.map { Instrument.Type.valueOf(it.instrumentType) }, + types = this.instrumentTypes?.map { Instrument.Type.valueOf(it.code) }, manufacturerTypes = this.manufacturerNames?.map { ManufacturerType.valueOf(it.manufacturerName) }, manufacturerDateFrom = this.manufactureDateFrom?.let { ManufacturerDate.from(it.manufactureDate) }, manufacturerDateTo = this.manufactureDateTo?.let { ManufacturerDate.from(it.manufactureDate) }, @@ -61,9 +70,12 @@ fun GetInstrumentsByCriteriaRequestBody.toInstrumentCriteria(): InstrumentExtrac ) } -fun Page.toRestResponse(): GetInstrumentByCriteriaPageResponse { +fun Page.toRestResponse( + messageSource: MessageSource, + locale: Locale, +): GetInstrumentByCriteriaPageResponse { return GetInstrumentByCriteriaPageResponse( - content = this.content.map { it.toDto() }, + content = this.content.map { it.toDto(messageSource, locale) }, contentSize = this.contentSize, pageSize = this.pageSize, pageNumber = this.pageNumber, diff --git a/server/app/src/main/resources/messages_en.properties b/server/app/src/main/resources/messages_en.properties new file mode 100644 index 00000000..5628fbfc --- /dev/null +++ b/server/app/src/main/resources/messages_en.properties @@ -0,0 +1,3 @@ +instrument.type.keyboard=Keyboard +instrument.type.stringed=Stringed +instrument.type.wind=Wind diff --git a/server/app/src/main/resources/messages_ru.properties b/server/app/src/main/resources/messages_ru.properties new file mode 100644 index 00000000..c36bb759 --- /dev/null +++ b/server/app/src/main/resources/messages_ru.properties @@ -0,0 +1,3 @@ +instrument.type.keyboard=????sdfg +instrument.type.stringed=???? +instrument.type.wind=???? From fc702e10e2d943efdb90d0888d92d0c5d59f39c8 Mon Sep 17 00:00:00 2001 From: skywalker Date: Fri, 30 Aug 2024 00:01:30 +0300 Subject: [PATCH 2/2] chore(instrument-types): use `UTF-8` --- .../src/main/kotlin/mu/muse/rest/dto/InstrumentType.kt | 6 +++--- server/app/src/main/resources/messages_ru.properties | 7 ++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/InstrumentType.kt b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/InstrumentType.kt index f244fb55..30282429 100644 --- a/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/InstrumentType.kt +++ b/server/app/build/openapi/src/main/kotlin/mu/muse/rest/dto/InstrumentType.kt @@ -13,9 +13,9 @@ import jakarta.validation.constraints.Size import jakarta.validation.Valid /** - * - * @param code - * @param localizedText + * + * @param code + * @param localizedText */ data class InstrumentType( diff --git a/server/app/src/main/resources/messages_ru.properties b/server/app/src/main/resources/messages_ru.properties index c36bb759..9cd8fbb8 100644 --- a/server/app/src/main/resources/messages_ru.properties +++ b/server/app/src/main/resources/messages_ru.properties @@ -1,3 +1,4 @@ -instrument.type.keyboard=????sdfg -instrument.type.stringed=???? -instrument.type.wind=???? +# UTF-8 file encoding required +instrument.type.keyboard=Клавишные +instrument.type.stringed=Струнные +instrument.type.wind=Духовые