Skip to content

Add Translatable Options for Search Elements #891

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
amrutadotorg opened this issue Apr 23, 2025 · 5 comments · Fixed by #893
Closed

Add Translatable Options for Search Elements #891

amrutadotorg opened this issue Apr 23, 2025 · 5 comments · Fixed by #893
Labels
enhancement New feature or request

Comments

@amrutadotorg
Copy link
Contributor

Hi, I'm working on a multilingual website. There are three places where I haven't been able to dynamically modify the text:

Search Placeholder: <input class="form-control me-2" type="search" placeholder="Search" aria-label="Search" name="search" value="">

Search Button: <button class="btn btn-outline-success" type="submit">Search</button>

Search Field (Table Component): <input type="search" class="form-control form-control-rounded fs-6 search" placeholder="Search…" value="">

It would be great to add options to the shell and table components to make these elements translatable.

thank you

@amrutadotorg amrutadotorg added the enhancement New feature or request label Apr 23, 2025
@lovasoa
Copy link
Collaborator

lovasoa commented Apr 23, 2025

You are right ! Could you please open a pull request with the change ?

The templates in https://github.com/sqlpage/SQLPage/tree/main/sqlpage/templates and the documentation in https://github.com/sqlpage/SQLPage/tree/main/examples/official-site/sqlpage/migrations need to be updated together.

If this helps, you can find a contribution guide here: https://github.com/sqlpage/SQLPage/blob/main/CONTRIBUTING.md

@amrutadotorg
Copy link
Contributor Author

great, what would you say of having in the table component
placeholder="{{default search_placeholder_value 'Search…'}}"

and for the shell component
<input class="form-control me-2" type="search" placeholder="{{default search_placeholder_value 'Search'}}" aria-label="Search" name="search" value="{{search_value}}">
and
<button class="btn btn-outline-success" type="submit">{{default search_button 'Search'}}</button>

table.handlebars.txt

shell.handlebars.txt

@lovasoa
Copy link
Collaborator

lovasoa commented Apr 24, 2025

maybe just search_placeholder instead of search_placeholder_value ?

@amrutadotorg
Copy link
Contributor Author

done #893

@lovasoa
Copy link
Collaborator

lovasoa commented Apr 24, 2025

Great, thank you ! We'll close this issue when we merge your pull request

@lovasoa lovasoa reopened this Apr 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants