0
0
mirror of https://github.com/ankidroid/Anki-Android.git synced 2024-09-20 03:52:15 +02:00
Anki-Android/.idea/dictionaries
Arthur Milchior d71d315d4d NF: add Sargam to usernames
This way it won't be shown as typo by Intelli-J
2024-07-07 16:57:58 +00:00
..
android.xml Dialog: 'media sync unavailable' before migration 2023-03-24 11:12:48 -05:00
anki.xml docs: ensure BrowserColumns are documented 2024-06-15 23:45:16 +00:00
Cath.xml Fix typo errors in card.js / add user spelling dictionary (#14305) 2023-08-26 10:33:13 -05:00
davidallison.xml fix: unencoded # in file paths 2024-03-22 16:23:33 +00:00
README.md adding links to the readme 2023-12-31 09:36:50 +00:00
usernames.xml NF: add Sargam to usernames 2024-07-07 16:57:58 +00:00

Dictionary Management for AnkiDroid

Introduction

This guide addresses the issue of managing custom dictionaries within JetBrains IDE -Android Studio. Often, when adding a word to the dictionary within the IDE, it remains user-specific and doesn't propagate across a team. This README explores a workaround for better collaboration regarding custom dictionaries in the IDE.

Implementation Steps

1. Understanding Directory Structure

  • The directory idea/dictionaries within the project root holds user-specific dictionary files.
  • Each user's added words are stored in a file named after their OS login username (e.g., catio.xml for a user named "catio") and this file is shared within the project.
  • anki.xml - Anki Desktop specific terminology: 'did'
  • android.xml - Android and dependencies: 'miui.securitycenter'
  • usernames.xml - Usernames in copyright declarations

2. Leveraging Shared Dictionary Files

  • Create a dictionary file formatted as an XML (similar to the user-specific ones) containing shared project-specific words.
  • Naming this file differently (not tied to a username) allows reuse across projects sharing the same terminology.

3. Managing Collaborative Editing

  • When multiple developers commit their dictionary files, potential word duplications may occur.
  • Manual editing of these XML files is necessary, as the IDE doesn't provide direct options to write to a shared dictionary.
  • Syntax: Use the XML structure specified in the example below to manually craft or edit dictionary files.

Note: Restart the IDE after editing the file or adding the file for the changes to take place

Example Dictionary File Structure

<component name="ProjectDictionaryState">
    <dictionary name="project-dictionary">
        <words>
            <w>someword</w>
        </words>
    </dictionary>
</component>

Best Practice for VCS Integration

  • Consider adding manually created shared dictionary files to the VCS, while ignoring the rest of idea/dictionaries.
  • This prevents automatic addition of words from individual IDEs to the shared dictionary, minimizing unnecessary duplications.