Skip to content

Commit 9dece72

Browse files
Merge pull request #559 from SuffolkLITLab/copilot/fix-518
Fix language variable in translation documentation - use al_user_language instead of al_interview_languages
2 parents 2d0b33c + 3beba4d commit 9dece72

File tree

3 files changed

+12
-39
lines changed

3 files changed

+12
-39
lines changed

docs/components/AssemblyLine/al_courts.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -183,14 +183,14 @@ Create a new courtloader object.
183183
#### all\_courts()
184184

185185
```python
186-
def all_courts() -> List[Dict[int, str]]
186+
def all_courts() -> List[Tuple[int, str]]
187187
```
188188

189189
Return a list of all courts in the spreadsheet.
190190

191191
**Returns**:
192192

193-
List[Dict[int, str]]: List of all ALCourt instances without filtering.
193+
List[Tuple[int, str]]: List of tuples where each tuple contains (dataframe_index, display_value). The dataframe_index (int) can be used with as_court() to retrieve the full court object. The display_value (str) is the court's name or other display column value.
194194

195195
<a id="AssemblyLine.al_courts.ALCourtLoader.unique_column_values"></a>
196196

@@ -292,14 +292,15 @@ def matching_courts_in_county(
292292
display_column: str = "name",
293293
search_string: Optional[str] = None,
294294
search_columns: Optional[Union[List[str], str]] = None
295-
) -> List[Dict[int, str]]
295+
) -> List[Tuple[int, str]]
296296
```
297297

298298
Retrieve a list of all courts in the specified county.
299299

300300
This function fetches courts suitable for displaying as a drop-down or radio button list
301-
in Docassemble. The results are dictionaries where the key is the index in the dataframe,
302-
useful for retrieving the court&#x27;s full details later using the as_court() method.
301+
in Docassemble. The results are tuples where the first element is the dataframe index
302+
(useful for retrieving the court&#x27;s full details later using the as_court() method) and
303+
the second element is the display value from the specified display_column.
303304

304305
**Arguments**:
305306

@@ -313,7 +314,7 @@ useful for retrieving the court&#x27;s full details later using the as_court() m
313314

314315
**Returns**:
315316

316-
List[Dict[int, str]]: List of dictionaries representing matching courts.
317+
List[Tuple[int, str]]: List of tuples where each tuple contains (dataframe_index, display_value). The dataframe_index (int) can be used with as_court() to retrieve the full court object. The display_value (str) is the court&#x27;s name or other display column value.
317318

318319
<a id="AssemblyLine.al_courts.ALCourtLoader.filter_courts"></a>
319320

@@ -326,12 +327,12 @@ def filter_courts(
326327
display_column: str = "name",
327328
search_string: Optional[str] = None,
328329
search_columns: Optional[Union[List[str], str]] = None
329-
) -> List[Dict[int, str]]
330+
) -> List[Tuple[int, str]]
330331
```
331332

332-
Return a filtered subset of courts represented as a list of dictionaries.
333+
Return a filtered subset of courts represented as a list of tuples.
333334

334-
Each dictionary has the format \{index: name\}, where &quot;index&quot; refers to the dataframe index and &quot;name&quot;
335+
Each tuple has the format (index, display_value), where &quot;index&quot; refers to the dataframe index and &quot;display_value&quot;
335336
is determined by the `display_column`.
336337

337338
**Arguments**:
@@ -347,7 +348,7 @@ is determined by the `display_column`.
347348

348349
**Returns**:
349350

350-
List[Dict[int, str]]: List of dictionaries representing filtered courts.
351+
List[Tuple[int, str]]: List of tuples where each tuple contains (dataframe_index, display_value). The dataframe_index (int) can be used with as_court() to retrieve the full court object. The display_value (str) is the court&#x27;s name or other display column value.
351352

352353
<a id="AssemblyLine.al_courts.ALCourtLoader.as_court"></a>
353354

docs/components/AssemblyLine/al_general.md

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@
6464
* [section\_links](#AssemblyLine.al_general.section_links)
6565
* [will\_send\_to\_real\_court](#AssemblyLine.al_general.will_send_to_real_court)
6666
* [filter\_letters](#AssemblyLine.al_general.filter_letters)
67-
* [fa\_icon](#AssemblyLine.al_general.fa_icon)
6867
* [is\_sms\_enabled](#AssemblyLine.al_general.is_sms_enabled)
6968
* [is\_phone\_or\_email](#AssemblyLine.al_general.is_phone_or_email)
7069
* [github\_modified\_date](#AssemblyLine.al_general.github_modified_date)
@@ -1430,33 +1429,6 @@ Avoid using, this is created for 209A.
14301429

14311430
- `str` - A string of unique letters.
14321431

1433-
<a id="AssemblyLine.al_general.fa_icon"></a>
1434-
1435-
#### fa\_icon(icon: str, color: str = "primary", color\_css: Optional[str] = None, size: str = "sm")
1436-
1437-
```python
1438-
def fa_icon(icon: str,
1439-
color: str = "primary",
1440-
color_css: Optional[str] = None,
1441-
size: str = "sm") -> str
1442-
```
1443-
1444-
Return HTML for a font-awesome icon of the specified size and color. You can reference
1445-
a CSS variable (such as Bootstrap theme color) or a true CSS color reference, such as &#x27;blue&#x27; or
1446-
&#x27;`DDDDDD`&#x27;. Defaults to Bootstrap theme color &quot;primary&quot;.
1447-
1448-
**Arguments**:
1449-
1450-
- `icon` _str_ - The name of the icon to use. See https://fontawesome.com/icons for a list of icons.
1451-
- `color` _str_ - The color of the icon. Defaults to &quot;primary&quot;.
1452-
- `color_css` _Optional[str]_ - A CSS variable or color reference. Defaults to None.
1453-
- `size` _str_ - The size of the icon. Defaults to &quot;sm&quot;.
1454-
1455-
1456-
**Returns**:
1457-
1458-
- `str` - HTML for the icon.
1459-
14601432
<a id="AssemblyLine.al_general.is_sms_enabled"></a>
14611433

14621434
#### is\_sms\_enabled()

docs/components/AssemblyLine/translation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ id: language
134134
question: |
135135
What language / que idioma?
136136
fields:
137-
- Language/idioma: al_interview_languages
137+
- Language/idioma: al_user_language
138138
datatype: radio
139139
choices:
140140
- English: en

0 commit comments

Comments
 (0)