Text strings are replacing UI elements
Closed this issue · 2 comments
HaSistrunk commented
Describe the bug
View Online and Download buttons are being replaced with text strings in the UI on the /object page in record details and on the /list page.
To reproduce
Steps to reproduce the behavior:
- Go to dimes.rockarch.org/objects/DQCoJGgCRXHnsPjKGiaCsZ
- See buttons in records details
- Add this item to your list
- Go to /list page
- See that "View Online" button is replaced with string of text
Error message or screenshots
![image](https://private-user-images.githubusercontent.com/15254041/248000268-bd5e836d-ff41-437b-b0dd-1d4bca5273be.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjA1MzA0MTQsIm5iZiI6MTcyMDUzMDExNCwicGF0aCI6Ii8xNTI1NDA0MS8yNDgwMDAyNjgtYmQ1ZTgzNmQtZmY0MS00MzdiLWIwZGQtMWQ0YmNhNTI3M2JlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzA5VDEzMDE1NFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTMwOGJkZDliZjJiZWQwOTQwNzYwMTAwYzYzZTkyOGJjMmQ5OTJjMzE4NGExNjBlNWVhNGM5ZTQ5Yzc2MjU2ODAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.kA60RugEEmV85Q0NK1I8LMtOp9lTQXO3ael8I0rpAy4)
Additional context
This seems to be a bug related to the lingui translations, because those text strings are present in /src/locales/en/messages.js
. However, I'm not seeing it in local development.
HaSistrunk commented
helrond commented
Running yarn extract
and yarn compile
(which extracts and compiles messages using lingui
) appears to have done the trick.
I think there are a couple of things we should do as a followup:
- Update the readme with a bit more information about when and how to extract and compile messages
- Consider rolling this into git pre-commit hooks and/or our CI pipeline in general