waydabber / BetterDisplay-localization

BetterDisplay-localization
8 stars 24 forks source link

Localization: English (UK) #49

Open waydabber opened 3 months ago

waydabber commented 3 months ago

This is the localization thread for UK English localization. :)

PuzzledUser commented 3 months ago

Go for it. Now I'm apprehensive at the transcription from my previous dumb approach.

waydabber commented 3 months ago

Here is a localizable file.

en-GB.xcloc.zip

You can either use XCode (simpler) or right click and "Show package contents" and edit the en-GB.xliff file using Notepad.

You should simply add a new target state="translated" line to each translation unit with the translation. Here is an example:

Original:

      <trans-unit id="Color Depth" xml:space="preserve">
        <source>Color Depth</source>
        <note/>
      </trans-unit>

With translation:

      <trans-unit id="Color Depth" xml:space="preserve">
        <source>Color Depth</source>
        <target state="translated">Colour Depth</target>
        <note/>
      </trans-unit>

Note the new <target state="translated">Colour Depth</target> line.

Let me know if you need any help! :)

PuzzledUser commented 3 months ago

Noob: I'm scratting around looking for the original of the about 119KB original Localizable.xcstrings file (that I used in https://github.com/waydabber/BetterDisplay/discussions/2165#discussioncomment-10365076) so I can run a diff on it to discover my previous edits. I've poked around various packages and can't find it. My Friday afternoon job has thus stalled.

If you're still with me, where might I find that file, so I don't have to read all the strings again to find my previous dumb changes?

waydabber commented 3 months ago

You probably got it from here:

https://github.com/waydabber/BetterDisplay-localization/tree/main/BetterDisplay%20Localizations/en.xcloc/Source%20Contents/BetterDisplay/Localizable

But it might have been a different version, you can click on the History button to see earlier revisions.

PuzzledUser commented 3 months ago

OK, I used a bash script to parse my diff and edit the XML. I noticed one anomaly in that this trans-unit and source didn't match:

      <trans-unit id="Set as Favorite %lld%@" xml:space="preserve">
        <source>Set as Favorite %1$lld%2$@</source>
  <target state="translated">Set as Favourite %1$lld%2$@</target>
        <note/>
      </trans-unit>

I found 118 translations (i.e. one seemed to escape me in the process).

en-GB.xliff.zip diff.txt

waydabber commented 3 months ago

Thank you, I'll add this to the next build! :)