Skip to content

Commit b3960b9

Browse files
authored
fix(agora): show full spoken language list (#1117)
* fix(agora): show full spoken language list Use the shared supported spoken-language enum as the source of truth for selectable spoken languages instead of hiding enum values missing metadata. Also keeps the language settings control visible during conversation imports and localizes the language settings menu copy more completely. Deploy: agora * docs: update contribution branding Replace stale ZKorum contribution-facing wording with Agora Citizen Network terminology while preserving legal trustee references. Deploy: none * feat(api): add display-aware translations Backend display content is now responsible for choosing original vs translated content for conversations, survey questions, and opinions based on viewer display and spoken languages. Source-equals-display hides translation controls, source-in-spoken defaults to original while keeping translation available, and unknown/unreadable sources can default to translated content when available. Changes: - Add backend display-content mapping shared across conversation, survey, and opinion responses - Add concrete conversation content fetch support and display content on conversation/survey/opinion endpoints - Split original and translated schemas so translated text is not constrained by original input limits - Use stable content ids for translated variant caching - Reuse conversation display-content logic in normal post content and survey hero - Schedule eager translation work after conversation edits - Harden content translation worker writes with savepoints and generated text columns - Regenerate OpenAPI clients and synced shared/generated models Deploy: agora, api, import-worker, scoring-worker, content-translation-worker * fix(api): prevent overlapping entitlements Reject active premium entitlements that overlap an existing entitlement for the same organization and feature. The same guard now applies when updating an entitlement into a new active period. Update the administrator entitlement form to use the shared select component, start with no feature preselected, disable creation for invalid date ranges, and prevent submitting periods that overlap an already loaded entitlement. Add focused DTO coverage for entitlement period validation. Deploy: agora, api * fix(workers): add Chinese translation siblings Update the simulated description translation provider to mirror production Chinese behavior by generating the Simplified Chinese sibling when translating through the canonical Traditional Chinese provider target. Also include opinionPlainText in load-testing opinion creation requests so generated load-test payloads match the current API contract. Deploy: none * fix(api): widen translated title column Add the generated Drizzle and Flyway migration for changing conversation_content_translation.translated_title to text so translated titles are not constrained by varchar length. Deploy: api
1 parent 89646ec commit b3960b9

199 files changed

Lines changed: 24699 additions & 2920 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CONTRIBUTING.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Contributing
22

3-
Thank you for contributing to ZKorum! ❤️
3+
Thank you for contributing to Agora Citizen Network! ❤️
44

55
## AUTHORS file
66

@@ -10,7 +10,7 @@ Every contributor must add their full name and email address in the [AUTHORS fil
1010

1111
Every contributor must [sign their commits](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits).
1212

13-
After configuring the signing key, commit using `git commit -s` or simply [configure your `.gitconfig` to do add the `-s` parameter automatically](https://github.com/zkorum/agora/blob/main/CONTRIBUTING.md#local-git-config-configuration).
13+
After configuring the signing key, commit using `git commit -s` or simply [configure your `.gitconfig` to add the `-s` parameter automatically](https://github.com/zkorum/agora/blob/main/CONTRIBUTING.md#local-git-config-configuration).
1414

1515
## FLA
1616

@@ -31,7 +31,7 @@ Follow these steps:
3131
- create a feature branch (never push to main)
3232
- create upstream remote locally
3333
- do some work, commit and push on this feature branch
34-
- open a DRAFT PR from this branch to upstream ZKorum main
34+
- open a DRAFT PR from this branch to upstream Agora Citizen Network main
3535
- sync your fork main from upstream and rebase your feature branch from main before every new work session
3636

3737
Let's detail some of the steps.
@@ -73,7 +73,7 @@ git remote add upstream git@github.com:zkorum/agora.git
7373
### Open a DRAFT PR
7474

7575
Connect to GitHub, and visit the page of your fork.
76-
A popup suggestion will appear after you've pushed some code in your feature branc. Click on it and choose "DRAFT PR". Source: `<your_fork/<your_branch>`, destination `upstream/main`. Default should be good already, no need to change it.
76+
A popup suggestion will appear after you've pushed some code in your feature branch. Click on it and choose "DRAFT PR". Source: `<your_fork>/<your_branch>`, destination `upstream/main`. Default should be good already, no need to change it.
7777

7878
### Sync your fork's main from upstream's main
7979

@@ -106,7 +106,7 @@ git checkout 11_my_feature_branch
106106
# We assume this local branch is up to date with remote origin (everything committed and pushed)
107107
# Note: you can't rebase if you have uncommitted changes locally. Do not stash them or when you will unstash them after the rebase, it might create conflicts. Just commit.
108108
git rebase -i origin/main
109-
# The above will open a screen on your editor of choice that you have configure earlier, so you can choose what to fixup/squash
109+
# The above will open a screen on your editor of choice that you configured earlier, so you can choose what to fixup/squash
110110
# Fixup or squash everything (fixup is better imho) except the first commit to avoid solving the same conflict multiple times at each of your commits.
111111
# Then save and close the window
112112

COPYING-README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
| [`scoring-worker`](./services/scoring-worker) | [![License: AGPL v3](https://img.shields.io/badge/License-AGPL%20v3-blue.svg)](./services/scoring-worker/COPYING)| [![documentation](https://img.shields.io/badge/readme-blue)](./services/scoring-worker) | 🏆 Solidago scoring worker for MaxDiff rankings |
1919
| [`x-analyzer`](./services/x-analyzer) | [![License: AGPL v3](https://img.shields.io/badge/License-AGPL%20v3-blue.svg)](./services/x-analyzer/COPYING) | [![documentation](https://img.shields.io/badge/readme-blue)](./services/x-analyzer) | 🐦 X/Twitter reply and quote tweet analyzer |
2020

21-
Attribution information for ZKorum is contained in the [AUTHORS](AUTHORS) file.
21+
Attribution information for Agora Citizen Network is contained in the [AUTHORS](AUTHORS) file.
2222

23-
Every contributors have signed the [Fiduciary Licensing Agreement (FLA)](https://cla-assistant.io/zkorum/zkorum) with [ZKorum SAS](https://annuaire-entreprises.data.gouv.fr/entreprise/zkorum-984736173) as the Trustee.
23+
The [Fiduciary Licensing Agreement (FLA)](https://cla-assistant.io/zkorum/zkorum) names [ZKorum SAS](https://annuaire-entreprises.data.gouv.fr/entreprise/zkorum-984736173) as the Trustee.
2424

2525
Note that ZKORUM and AGORA CITIZEN NETWORK are registered trademarks. The logos, custom icons and other assets are all rights reserved © 2024 ZKorum SAS <hello@zkorum.com>. These assets cannot be used without written consent from ZKorum SAS.

services/agora/src/api/.openapi-generator/FILES

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ docs/ApiV1ContentTranslationRequestPost200ResponseAnyOf1ContentAnyOf1Variants.md
5959
docs/ApiV1ContentTranslationRequestPost200ResponseAnyOf1ContentAnyOf2.md
6060
docs/ApiV1ContentTranslationRequestPost200ResponseAnyOf1ContentAnyOf2Variants.md
6161
docs/ApiV1ContentTranslationRequestPost200ResponseAnyOf1ContentAnyOfVariants.md
62-
docs/ApiV1ContentTranslationRequestPost200ResponseAnyOf1ContentAnyOfVariantsOriginal.md
6362
docs/ApiV1ContentTranslationRequestPost200ResponseAnyOf2.md
6463
docs/ApiV1ContentTranslationRequestPost200ResponseAnyOf2Content.md
6564
docs/ApiV1ContentTranslationRequestPost200ResponseAnyOf2ContentAnyOf.md
@@ -68,8 +67,6 @@ docs/ApiV1ContentTranslationRequestPost200ResponseAnyOf2ContentAnyOf1Variants.md
6867
docs/ApiV1ContentTranslationRequestPost200ResponseAnyOf2ContentAnyOf2.md
6968
docs/ApiV1ContentTranslationRequestPost200ResponseAnyOf2ContentAnyOf2Variants.md
7069
docs/ApiV1ContentTranslationRequestPost200ResponseAnyOf2ContentAnyOfVariants.md
71-
docs/ApiV1ContentTranslationRequestPost200ResponseAnyOf2ContentAnyOfVariantsOriginal.md
72-
docs/ApiV1ContentTranslationRequestPost200ResponseAnyOf2ContentAnyOfVariantsOriginalOptionsInner.md
7370
docs/ApiV1ContentTranslationRequestPost200ResponseAnyOf3.md
7471
docs/ApiV1ContentTranslationRequestPost200ResponseAnyOf4.md
7572
docs/ApiV1ContentTranslationRequestPost200ResponseAnyOfContent.md
@@ -93,6 +90,7 @@ docs/ApiV1ContentTranslationRequestPostRequestSubjectOneOf2.md
9390
docs/ApiV1ConversationClosePost200Response.md
9491
docs/ApiV1ConversationClosePost200ResponseOneOf.md
9592
docs/ApiV1ConversationClosePost200ResponseOneOf1.md
93+
docs/ApiV1ConversationContentFetchPostRequest.md
9694
docs/ApiV1ConversationCreatePost200Response.md
9795
docs/ApiV1ConversationCreatePost200ResponseOneOf.md
9896
docs/ApiV1ConversationCreatePost200ResponseOneOf1.md
@@ -154,6 +152,10 @@ docs/ApiV1ConversationGetForEditPost200ResponseOneOfSurveyConfigQuestionsInnerOn
154152
docs/ApiV1ConversationGetForEditPost200ResponseOneOfSurveyConfigQuestionsInnerOneOf1Constraints.md
155153
docs/ApiV1ConversationGetForEditPost200ResponseOneOfSurveyConfigQuestionsInnerOneOf1ConstraintsAnyOf.md
156154
docs/ApiV1ConversationGetPost200Response.md
155+
docs/ApiV1ConversationGetPost200ResponseDisplayContent.md
156+
docs/ApiV1ConversationGetPost200ResponseDisplayContentAnyOf.md
157+
docs/ApiV1ConversationGetPost200ResponseDisplayContentAnyOf1.md
158+
docs/ApiV1ConversationGetPost200ResponseDisplayContentAnyOf1Content.md
157159
docs/ApiV1ConversationImportActivePost200Response.md
158160
docs/ApiV1ConversationImportActivePost200ResponseOneOf.md
159161
docs/ApiV1ConversationImportActivePost200ResponseOneOf1.md
@@ -247,6 +249,14 @@ docs/ApiV1OpinionFetchAnalysisFrameManifestByConversationPostRequest.md
247249
docs/ApiV1OpinionFetchAnalysisFrameManifestByConversationPostRequestFreshness.md
248250
docs/ApiV1OpinionFetchAnalysisFrameOpinionListByFramePost200Response.md
249251
docs/ApiV1OpinionFetchAnalysisFrameOpinionListByFramePostRequest.md
252+
docs/ApiV1OpinionFetchByConversationPost200ResponseInner.md
253+
docs/ApiV1OpinionFetchByConversationPost200ResponseInnerDisplayContent.md
254+
docs/ApiV1OpinionFetchByConversationPost200ResponseInnerDisplayContentAnyOf.md
255+
docs/ApiV1OpinionFetchByConversationPost200ResponseInnerDisplayContentAnyOf1.md
256+
docs/ApiV1OpinionFetchByConversationPost200ResponseInnerDisplayContentAnyOf1Content.md
257+
docs/ApiV1OpinionFetchByConversationPost200ResponseInnerDisplayContentAnyOf2.md
258+
docs/ApiV1OpinionFetchByConversationPost200ResponseInnerDisplayContentAnyOfContent.md
259+
docs/ApiV1OpinionFetchByConversationPost200ResponseInnerDisplayContentAnyOfTranslationControl.md
250260
docs/ApiV1OpinionFetchByConversationPostRequest.md
251261
docs/ApiV1OpinionFetchBySlugIdListPostRequest.md
252262
docs/ApiV1OpinionFetchCommentStatsByConversationPost200Response.md
@@ -266,12 +276,21 @@ docs/ApiV1SurveyConfigUpdatePost200Response.md
266276
docs/ApiV1SurveyConfigUpdatePostRequest.md
267277
docs/ApiV1SurveyConfigUpdatePostRequestSurveyConfig.md
268278
docs/ApiV1SurveyFormFetchPost200Response.md
269-
docs/ApiV1SurveyFormFetchPost200ResponseQuestionsInner.md
270-
docs/ApiV1SurveyFormFetchPost200ResponseQuestionsInnerOneOf.md
271-
docs/ApiV1SurveyFormFetchPost200ResponseQuestionsInnerOneOf1.md
272-
docs/ApiV1SurveyFormFetchPost200ResponseQuestionsInnerOneOfCurrentAnswer.md
273-
docs/ApiV1SurveyFormFetchPost200ResponseQuestionsInnerOneOfCurrentAnswerOneOf.md
274-
docs/ApiV1SurveyFormFetchPost200ResponseQuestionsInnerOneOfCurrentAnswerOneOf1.md
279+
docs/ApiV1SurveyFormFetchPost200ResponseOneOf.md
280+
docs/ApiV1SurveyFormFetchPost200ResponseOneOf1.md
281+
docs/ApiV1SurveyFormFetchPost200ResponseOneOfQuestionsInner.md
282+
docs/ApiV1SurveyFormFetchPost200ResponseOneOfQuestionsInnerAllOfDisplayContent.md
283+
docs/ApiV1SurveyFormFetchPost200ResponseOneOfQuestionsInnerAllOfDisplayContentAnyOf.md
284+
docs/ApiV1SurveyFormFetchPost200ResponseOneOfQuestionsInnerAllOfDisplayContentAnyOf1.md
285+
docs/ApiV1SurveyFormFetchPost200ResponseOneOfQuestionsInnerAllOfDisplayContentAnyOf1Content.md
286+
docs/ApiV1SurveyFormFetchPost200ResponseOneOfQuestionsInnerAllOfDisplayContentAnyOf1ContentOptionsInner.md
287+
docs/ApiV1SurveyFormFetchPost200ResponseOneOfQuestionsInnerAllOfDisplayContentAnyOfContent.md
288+
docs/ApiV1SurveyFormFetchPost200ResponseOneOfQuestionsInnerAllOfDisplayContentAnyOfContentOptionsInner.md
289+
docs/ApiV1SurveyFormFetchPost200ResponseOneOfQuestionsInnerAllOfOneOf.md
290+
docs/ApiV1SurveyFormFetchPost200ResponseOneOfQuestionsInnerAllOfOneOf1.md
291+
docs/ApiV1SurveyFormFetchPost200ResponseOneOfQuestionsInnerAllOfOneOfCurrentAnswer.md
292+
docs/ApiV1SurveyFormFetchPost200ResponseOneOfQuestionsInnerAllOfOneOfCurrentAnswerOneOf.md
293+
docs/ApiV1SurveyFormFetchPost200ResponseOneOfQuestionsInnerAllOfOneOfCurrentAnswerOneOf1.md
275294
docs/ApiV1SurveyResponseWithdrawPost200Response.md
276295
docs/ApiV1SurveyResponseWithdrawPost200ResponseOneOf.md
277296
docs/ApiV1SurveyResultsAggregatedPost200Response.md

0 commit comments

Comments
 (0)