Admin interface allows overwriting any stranslations which is very healful not just for utilizing community translation while updating them with custom phrases that suit a specific community, but at the same time it is also a very good way to gradually translate a new language, without the need of updating the code, hence rebuilding the cache. However, it would be great if the customized translations can be exported from the database and somehoe merged back into the corresponding YAML files to make it available in the main repository. Is there a way of doing that which I am not aware of?
I don’t think there is a job for this but 100% support these two tasks, which could help you out here
rake export:locale_overrides:server > server.xx.yml
rake export:locale_overrides:client > client.xx.yml
누군가 이미 이걸 만들었는지 아시는 분 계신가요?
@sam 로컬을 내보내기 위한 작업을 실행해 보았지만 작동하지 않습니다.
아래와 같은 메시지가 표시됩니다.
Don't know how to build task 'export:locale_overrides:server' (See the list of available tasks with `rake --tasks`)
혹시 아이디어가 있으신가요?
아직 아무도 이 작업을 생성하지 않아서, 명확성을 위해 pr-welcome 태그를 추가할 예정입니다
저도 이 부분에 대해 고민해 보고 PR을 작성했습니다:
여기서 마무리를 하자면, @mqmenchaca와 저는 서로의 작업을 모른 채 동시에 이 문제를 작업했습니다. 그리고 불과 몇 시간 차이의 PR을 만들었죠! Max의 PR을 확인하기 직전에 제 PR을 코어에 이미 병합해 놓았기 때문에, 안타깝게도 Max의 작업은 코어에 병합할 수 없습니다. 그럼에도 불구하고 @mqmenchaca님의 기여에 진심으로 감사드립니다!
이 기능을 추가하는 커밋은 이 것입니다: DEV: Add a rake task to export/import translation overrides (#18487) · discourse/discourse@4d80110 · GitHub
내보내려면 bin/rake export:translation_overrides를 실행하세요. (오버라이드가 포함된 JSON 파일이 생성됩니다.)
다른 인스턴스에 가져오려면, 내보낸 JSON 파일을 해당 인스턴스로 복사한 후 bin/rake import:file["filename"]를 실행하세요.
안녕하세요. 실행하는 단계를 설명해 주실 수 있을까요?
./launcher enter app
bin/rake export:translation_overrides
반환값:
rake aborted!
ActiveRecord::NoDatabaseError: We could not find your database: discourse. Which can be found in the database configuration file located at config/database.yml
이것은 환경 관련 문제인 것 같습니다. 제 자체 호스팅 인스턴스에서 컨테이너에 진입하면 rake 명령어를 정상적으로 실행할 수 있습니다.
Nginx 뒤에 Discourse를 사용 중인데, 이것이 관련이 있을 수 있나요? 컨테이너 외부의 데이터베이스를 사용하여 명령어를 실행할 수 있나요?
OK, 테스트를 좀 해봤고 파일을 내보냈습니다.
해당 파일을 수정하여 es_XX를 es로 변경하고(파일 형식과 문자 인코딩에 주의하면서, 그 외에는 아무것도 변경하지 않고) 이전에 내보낸 파일을 가져오면 정상적으로 작동할까요?
이전 오버라이드를 인스턴스에서 기본 es 언어로 이동하고 싶습니다 ![]()