Skip to content

Commit 67ca548

Browse files
authored
Fixed translation error and improved idea title behaviour (#1351)
- "Filter" translation in FR - images will no longer set the title of an idea - manually clearing the title will reset the "manually edited" flag
1 parent bb98ac4 commit 67ca548

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

locale/fr/client.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"error.pagenotfound.title": "Page non trouvée",
3939
"error.unauthorized.text": "Vous n'êtes pas autorisé à accéder à cette page.",
4040
"error.unauthorized.title": "Non autorisé",
41-
"home.filter.label": "Flitrer",
41+
"home.filter.label": "Filtrer",
4242
"home.filter.search.label": "Rechercher dans les filtres...",
4343
"home.form.defaultinvitation": "Entrez votre suggestion ici...",
4444
"home.form.defaultwelcomemessage": "Nous aimerions savoir ce que vous pensez.\n\nQue pouvons-nous faire de mieux ? C'est ici que vous pouvez voter, discuter et partager vos idées.",

public/pages/Home/components/ShareFeedback.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,9 @@ export const ShareFeedback: React.FC<ShareFeedbackProps> = (props) => {
139139
setCachedTitle(value)
140140
// If this is a manual edit (not auto-generated from description),
141141
// mark the title as manually edited so we stop auto-populating
142+
// If the user clears the title, we still want to allow auto-population
142143
if (isManualEdit) {
143-
setTitleManuallyEdited(true)
144+
setTitleManuallyEdited(value !== "")
144145
}
145146
}
146147

@@ -157,6 +158,12 @@ export const ShareFeedback: React.FC<ShareFeedbackProps> = (props) => {
157158

158159
const handleDescriptionChange = (value: string, plainText?: string) => {
159160
setCachedDescription(value)
161+
162+
// If the description starts with an image attachment, we don't want to set it as the title
163+
if (value.startsWith("![](fider-image:attachments")) {
164+
return
165+
}
166+
160167
setDescription(value)
161168

162169
// Store plain text version if provided

0 commit comments

Comments
 (0)