{"id":16564477,"url":"https://github.com/stevencohn/resxtranslator","last_synced_at":"2025-03-16T20:30:55.942Z","repository":{"id":110285997,"uuid":"310429856","full_name":"stevencohn/ResxTranslator","owner":"stevencohn","description":"Automates the translation of resx files using throttled access to the Google Translation API","archived":false,"fork":false,"pushed_at":"2024-09-22T10:03:12.000Z","size":2408,"stargazers_count":23,"open_issues_count":2,"forks_count":5,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-16T05:12:55.336Z","etag":null,"topics":["csharp","resx","translate"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stevencohn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["stevencohn"]}},"created_at":"2020-11-05T22:15:20.000Z","updated_at":"2025-03-06T23:22:08.000Z","dependencies_parsed_at":"2023-12-11T23:23:16.892Z","dependency_job_id":"28aad87c-015b-4bd3-a371-93987635fe00","html_url":"https://github.com/stevencohn/ResxTranslator","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stevencohn%2FResxTranslator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stevencohn%2FResxTranslator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stevencohn%2FResxTranslator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stevencohn%2FResxTranslator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stevencohn","download_url":"https://codeload.github.com/stevencohn/ResxTranslator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243928247,"owners_count":20370258,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csharp","resx","translate"],"created_at":"2024-10-11T20:44:19.311Z","updated_at":"2025-03-16T20:30:55.551Z","avatar_url":"https://github.com/stevencohn.png","language":"C#","funding_links":["https://github.com/sponsors/stevencohn"],"categories":[],"sub_categories":[],"readme":"# ResxTranslator\nTranslates entire resx files or individual bits of text to multiple languages.\n\nThere are four main tabs\n\n- Translate Resx file - translates a resx file to the specified languages, fully explained below.\n- Translate Text - translates a given text to a selected language. Use this for quick translations\n- Analyze - identifies duplicate words and phrases in the resx file, useful for consolidating and cleaning up resource strings\n- Tools - Additional resx management tools\n\nInspired by https://github.com/salarcode/AutoResxTranslator\n\n## Translate Resx File\nTranslates an entire .resx file to one or more languages.\n\n1. Choose a .resx file to translate. It will detect the language based on the language/culture\n   code in the filename, or English if no code is included. It will remember the last file\n   translated.\n2. Choose the output directory where new .resx files should be stored. If this is left blank\n   then new files are stored in the same directory as the source file.\n3. Choose the target translation languages. \n\n_Options_\n\n* Enable the _Translate only new strings_ checkbox to translate only new strings that were added\n  to the source resx file that are not yet in the target resx file(s). It will detect entries\n  that were deleted in the source file and remove them from the target files. It also detects\n  the keyword **!EDIT** in the comment of each entry; if this keyword is found, it will translate\n  that entry and replace the value in all taret files; if this keyword is not found and the\n  resource identifier exists in both the source and target file, that entry is left untouched.\n\n* Enable the _Clear markers_ checkbox to remove the **!EDIT** keyword from all entires in the source\n  resx file. If generating all languages in a single batch then you can safely enable this option.\n  If translating one language at a time, enable this only when processing the last target file\n  in your workflow, otherwise subsequent runs may not produce the correct results.\n\n### Language Selections\n\n![Translate Resx](Images/LanguagesScreen.png)\n\n### Working\n\n![Translate Resx](Images/TranslateResxScreen.png)\n\n### Skipping Resources\n\nIf the resource file includes control or configuration entries that should not be translated\nthen flag these by including the word **!SKIP** in the entry's comment. It must be capitalized.\nThe comment can include other text besides the word **!SKIP**.\n\n### Using an Override Hint File\n\nWhile Google translator is generally quite good, there are nuances in languages that it can't\npredict and may make a native speaker question the appropriateness of the translation. For each\nlanguage, you can provide an optional hint file that contains preferred translations for each\nresource identifier. This must be an XML file located in the same directory as the source resx\nfile and must be named _name_._code_-hints.xml, for example Resources.de-DE-hints.xml.\n\nThe contents of the hints file should look similar to the following:\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\u003chints\u003e\n  \u003chint name=\"resouce-identifier1\"\u003e\n    \u003csource\u003e\n      copy of the source text from the main resx file\n    \u003c/source\u003e\n    \u003cpreferred\u003e\n      my preferred translation here\n    \u003c/preferred\u003e\n  \u003c/hint\u003e\n  \u003chint name=\"resouce-identifier2\"\u003e\n    \u003csource\u003e\n      copy of the source text from the main resx file\n    \u003c/source\u003e\n    \u003cpreferred\u003e\n      my preferred translation here\n    \u003c/preferred\u003e\n  \u003c/hint\u003e\n\u003c/hints\u003e\n```\nWhen resources are translated to that language, ResxTranslator will first look in this hint file\neach resource identifier and use the available text before attempting to use Google translate.\n\nNotice that the file includes a copy of the original source text. ResxTranslator uses this to\ndetect if the source item has been updated since this hint was last created and display a warning\nthat the hint may be out of date and needs correcting.\n\n## Translate Text\nTranslate one string, phrase, or paragraph of text.\n\n![Translate Text](Images/TranslateTextScreen.png)\n\n### Inflation Detection\n\nThe free Google translator will sometime add extra spaces around non-alphanumeric characters\nwhen translating. For example \"x+1\" may become \"x + 1\" (from no spaces around the plus sign,\nto spaces around the plus sign.) x\n\n\nResxTranslator attempts to detect this string *inflation* and displays a warning for each\nstring that may need manual tuning. Of course, the program itself has no way of knowing the\nexact context of the translation so it simply compares the number of spaces in the input\nstring and the output string. Most of the time, the translation is accurate and shouldn't\nneed to be adjusted manually.\n\n## Analyze\n\nThe Analyze tab analyzes a resx file looking for duplicate uses of words and phrase.\n\n![Analyze Resources](Images/AnalyzeScreen.png)\n\n### Ignoring Known Duplicate\n\nThere will likely be legitimate cases where you want to use duplicates but in very\ndifferent contexts. In these case, you can tag those resources with the **!NODUP** keyword;\nthe analyzer will ignore those resources and not report them as duplicates.\n\n## Tools\n\nThe Tools tab contains operations that help maintain resx files.\n\n![Translate Text](Images/ToolsScreen.png)\n\n### Sort Data Items\nSorts the `\u003cdata\u003e` items within a resx file alphabetically by resourceID.\nThis makes it easier to find specific resources when viewing the file in a text editor.\n\n### Update Hint Sources\nUpdates the values of the `\u003csource\u003e` elements within an override hints file. \nThis should be used when the original source text has changed so you can verify\nindividual items. It can also be used to fill in any missing `\u003csource\u003e` elements or values\nor correct the case-sensitive resource name of each hint.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstevencohn%2Fresxtranslator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstevencohn%2Fresxtranslator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstevencohn%2Fresxtranslator/lists"}