Skip to content

Commit fd5c8bc

Browse files
committed
Merge branch 'main' into temp/18872
# Conflicts: # tests/Umbraco.Tests.UnitTests/Umbraco.Core/PropertyEditors/BlockListEditorPropertyValueEditorTests.cs
2 parents 468beb1 + 0f53ba8 commit fd5c8bc

File tree

2,755 files changed

+58202
-45813
lines changed

Some content is hidden

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

2,755 files changed

+58202
-45813
lines changed

.github/CONTRIBUTING.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Contributing to Umbraco CMS
22

3-
👍🎉 First off, thanks for taking the time to contribute! 🎉👍
3+
👍🎉 First of all, thanks for taking the time to contribute! 🎉👍
44

5-
These contribution guidelines are mostly just that - guidelines, not rules. This is what we've found to work best over the years, but if you choose to ignore them, we still love you! 💖 Use your best judgement, and feel free to propose changes to this document in a pull request.
5+
These contribution guidelines are mostly just that - guidelines, not rules. This is what we've found to work best over the years, but if you choose to ignore them, we still love you! 💖 Use your best judgment, and feel free to propose changes to this document in a pull request.
66

77
We have a guide on [what to consider before you start](contributing-before-you-start.md) and more detailed guides at the end of this article.
88

@@ -12,51 +12,51 @@ This guide describes each step to make your first contribution:
1212

1313
1. **Fork**
1414

15-
Create a fork of [`Umbraco-CMS` on GitHub](https://github.com/umbraco/Umbraco-CMS)
15+
Create a fork of [`Umbraco-CMS` on GitHub](https://github.com/umbraco/Umbraco-CMS)
1616

17-
![Fork the repository](img/forkrepository.png)
17+
![Fork the repository](img/forkrepositorynew.png)
1818

1919
2. **Clone**
2020

21-
When GitHub has created your fork, you can clone it in your favorite Git tool or on the command line with `git clone https://github.com/[YourUsername]/Umbraco-CMS`.
21+
When GitHub has created your fork, you can clone it in your favorite Git tool or on the command line with `git clone https://github.com/[YourUsername]/Umbraco-CMS`.
2222

23-
![Clone the fork](img/clonefork.png)
23+
![Clone the fork](img/cloneforknew.png)
2424

2525
3. **Switch to the correct branch**
2626

27-
Switch to the `contrib` branch
27+
Switch to the `main` branch
2828

2929
4. **Branch out**
3030

31-
Create a new branch based on `contrib` and name it after the issue you're fixing, For example: `v15/bugfix/18132-rte-tinymce-onchange-value-check`.
31+
Create a new branch based on `main` and name it after the issue you're fixing. For example: `v15/bugfix/18132-rte-tinymce-onchange-value-check`.
3232

33-
Please follow this format for branches: `v{major}/{feature|bugfix|task}/{issue}-{description}`.
33+
Please follow this format for branches: `v{major}/{feature|bugfix|task}/{issue}-{description}`.
3434

35-
This is a development branch for the particular issue you're working on, in this case a bug-fix for issue number `18132` that affects Umbraco v.15.
35+
This is a development branch for the particular issue you're working on, in this case, a bug-fix for issue number `18132` that affects Umbraco v.15.
3636

37-
Don't commit to `contrib`, create a new branch first.
37+
Don't commit to `main`, create a new branch first.
3838

3939
5. **Build or run a Development Server**
4040

41-
You can build or run a Development Server with any IDE that supports DotNet or the command line.
41+
You can build or run a Development Server with any IDE that supports .NET or the command line.
4242

43-
Read [Build or run a Development Server](BUILD.md) for the right approach to your needs.
43+
Read [Build or run a Development Server](BUILD.md) for the right approach to your needs.
4444

4545
6. **Change**
4646

47-
Make your changes, experiment, have fun, explore and learn, and don't be afraid. We welcome all contributions and will [happily give feedback](contributing-first-issue.md#questions).
47+
Make your changes, experiment, have fun, explore and learn, and don't be afraid. We welcome all contributions and will [happily give feedback](contributing-first-issue.md#questions).
4848

4949
7. **Commit and push**
5050

51-
Done? Yay! 🎉
51+
Done? Yay! 🎉
5252

53-
Remember to commit to your branch. When it's ready push the changes to your fork on GitHub.
53+
Remember to commit to your branch. When it's ready, push the changes to your fork on GitHub.
5454

5555
8. **Create pull request**
5656

57-
On GitHub, in your forked repository (`https://github.com/[YourUsername]/Umbraco-CMS`) you will see a banner saying that you pushed a new branch and a button to make a pull request. Tap the button and follow the instuctions.
57+
On GitHub, in your forked repository (`https://github.com/[YourUsername]/Umbraco-CMS`), you will see a banner saying that you pushed a new branch and a button to make a pull request. Tap the button and follow the instructions.
5858

59-
Want to read further? [Creating a pull request and what happens next](contributing-creating-a-pr.md).
59+
Would you like to read further? [Creating a pull request and what happens next](contributing-creating-a-pr.md).
6060

6161
## Further contribution guides
6262

.github/contributing-localization.md

Lines changed: 223 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,223 @@
1+
# **Contributing to Localization in the Backoffice**
2+
3+
Do you want to help keep our translations accurate and up to standard? 🌍✨
4+
5+
Your input makes a real difference! By reviewing, refining, or suggesting improvements, you ensure that our translations remain clear, consistent, and user-friendly for everyone.
6+
7+
8+
## **How Can I Contribute?**
9+
10+
To contribute to localization in the Backoffice, follow this step-by-step guide:
11+
12+
13+
### **1. Change the Language in Backoffice**
14+
15+
16+
17+
1. Open the Backoffice, click on your profile icon in the top-right corner, and select "Edit."
18+
19+
20+
21+
![Menubar profile image](/.github/img/contributing/ProfileImage.png "Menubar profile image")
22+
23+
24+
25+
![Edit button inside profile](/.github/img/contributing/editBtn.png "Edit button inside profile")
26+
27+
28+
2. Under "UI Culture," select the language you want to review from the dropdown menu.
29+
30+
31+
32+
![Dropdown of languages in Umbraco](/.github/img/contributing/uiCulture.png "Dropdown of languages in Umbraco")
33+
34+
35+
36+
### **2. Find a Translation Error**
37+
38+
39+
40+
1. Navigate through the Backoffice and check if everything is translated correctly.
41+
42+
2. When you find a translation error, right-click on it and select "Inspect."
43+
44+
3. Look for the nearest element that starts with `umb-` and has a name indicating something specific to the given location.
45+
46+
**Example:**
47+
48+
* The closest parent element should be specific, such as `umb-document-type-workspace-view-settings` instead of a generic element like `umb-property-layout.`
49+
50+
51+
### **3. Find the Code in VS Code**
52+
53+
54+
55+
1. Open VS Code and search for the nearest `umb-` element you identified.
56+
57+
58+
59+
![Search for nearest umb element in code](/.github/img/contributing/searchInVsCode.png "Search for nearest umb element in code")
60+
61+
2. Scroll down to find `render() {` and look for the element label that needs updating.
62+
63+
64+
![Find render and label in code](/.github/img/contributing/renderCode.png "Find render and label in code")
65+
66+
3. If the label is hardcoded, it must be updated.
67+
68+
**Example:**
69+
`label="Vary by culture"`
70+
71+
72+
### **4. Find the Correct Translation**
73+
74+
75+
76+
1. Open the `en.ts` or `en-us.ts` file and search for relevant keywords. \
77+
\
78+
**Example:**
79+
80+
* If the text is "Vary by culture," search for `vary`, `culture`, or `Vary by culture`.
81+
82+
83+
2. Once you find the translation, take the element name and search for it in the target language file (e.g., `da-dk.ts` for Danish).
84+
85+
86+
![Search for translation in language files](/.github/img/contributing/searchingThroughLanguageFiles.png "Search for translation in language files")
87+
88+
3. If a translation exists, insert it into the label element found earlier.
89+
90+
91+
92+
### **5. Insert the Translation**
93+
94+
To display the new translation correctly, insert the following code inside the label element:
95+
96+
`${this.localize.term('action_key')}`
97+
98+
Replace `action_key` with the correct translation key.
99+
100+
**Example:**
101+
102+
`${this.localize.term('contentTypeEditor_allowVaryByCulture')}`
103+
104+
![Localization code snippet](/.github/img/contributing/localizationCodeSnippetInCode.png "Localization code snippet")
105+
106+
107+
Save the changes and return to the Backoffice to see the update.
108+
109+
110+
![Changes in backoffice after changes in code](/.github/img/contributing/changedBackofficeAfterLocalization.png "Changes in backoffice after changes in code")
111+
112+
113+
114+
### **6. Commit and Push**
115+
116+
117+
118+
1. Commit your changes to a new temporary branch (avoid committing directly to `contrib`).
119+
120+
2. Push the changes to your fork on GitHub.
121+
122+
123+
### **7. Create a Pull Request**
124+
125+
126+
127+
1. In your forked repository on GitHub (`https://github.com/[YourUsername]/Umbraco-CMS`), a banner will appear stating that you pushed a new branch.
128+
129+
2. Click the button to create a pull request and follow the instructions.
130+
131+
132+
## **I Can’t Find the Correct Translation**
133+
134+
If you can’t find the translation you need, it may not exist yet. In this case, you can create a new action with related keys.
135+
136+
137+
### **1. Ensure It Doesn’t Already Exist**
138+
139+
Search thoroughly in `en.ts` or `en-us.ts` for all relevant keywords.
140+
141+
142+
### **2. Create an Action**
143+
144+
145+
146+
1. Choose a meaningful name for the action to avoid confusion. \
147+
\
148+
**Example:** Translation for the Data Type "Color Picker."
149+
150+
* **Good name:** `colorPickerConfigurations`
151+
* **Bad name:** `colorpicker`
152+
2. A specific action name prevents unnecessarily long key names.
153+
154+
3. Define the action:
155+
156+
157+
158+
### **3. Create Keys**
159+
160+
161+
162+
1. Use clear and descriptive key names. \
163+
\
164+
**Example:**
165+
* **Good name:** `colorsTitle`
166+
* **Bad name:** `colors`
167+
2. Add the necessary keys inside the action with proper translations.
168+
169+
170+
171+
![Action and related Keys in language files](/.github/img/contributing/actionAndKeys.png "Action and related Keys in language files")
172+
173+
174+
175+
## **I Can’t Find a <code>render()</code> Code in VS Code**
176+
177+
In some cases, such as Data Types, the label might not be inside `render()`. Instead, it may be in a manifest file.
178+
179+
180+
### 1. Search for the Text
181+
182+
Copy the text from the Backoffice and search for it in the code.
183+
184+
185+
### 2. Open the Manifest File
186+
187+
Once you find the relevant manifest file, open it to confirm you’re in the right place.
188+
189+
190+
### 3. Change the Label
191+
192+
In Markdown files, localization is slightly different. Instead of:
193+
`${this.localize.term('action_key')}`
194+
195+
Use: `#action_key`
196+
197+
**Example:**
198+
`#colorPickerConfigurations_showLabelTitle`
199+
200+
### 4. Change the Description
201+
202+
For descriptions in Markdown files, use:
203+
`{umbLocalize: action_key}`
204+
205+
**Example:**
206+
`{umbLocalize: colorPickerConfigurations_showLabelDescription}`
207+
208+
209+
### 5. Save and Verify
210+
211+
Once all changes are made, your manifest should look something like this:
212+
213+
214+
![Localization changes to manifest files](/.github/img/contributing/finishedManifestAfterLocalizatonChanges.png "Localization changes to manifest files")
215+
216+
217+
218+
---
219+
220+
221+
### Thank you
222+
223+
Following these steps ensures that the Umbraco Backoffice remains accessible and user-friendly in all supported languages. Thanks for contributing! 🎉

.github/img/cloneforknew.png

26.5 KB
Loading
12.7 KB
Loading
28.8 KB
Loading
Loading

.github/img/contributing/editBtn.png

19.8 KB
Loading
Loading
Loading
170 KB
Loading
21.4 KB
Loading
Loading
148 KB
Loading

.github/img/forkrepositorynew.png

33.5 KB
Loading
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Backoffice Static Web Apps CI/CD
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- v*/dev
8+
- v*/main
9+
paths:
10+
- src/Umbraco.Web.UI.Client/package.json
11+
- src/Umbraco.Web.UI.Client/package-lock.json
12+
- src/Umbraco.Web.UI.Client/src/**
13+
- .github/workflows/azure-backoffice.yml
14+
pull_request:
15+
types: [opened, synchronize, reopened, closed]
16+
branches:
17+
- main
18+
- v*/dev
19+
- v*/main
20+
21+
jobs:
22+
build_and_deploy_job:
23+
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed' && (contains(github.event.pull_request.labels.*.name, 'preview/backoffice')))
24+
runs-on: ubuntu-latest
25+
name: Build and Deploy Job
26+
steps:
27+
- uses: actions/checkout@v4
28+
with:
29+
submodules: true
30+
- name: Build And Deploy
31+
id: builddeploy
32+
uses: Azure/static-web-apps-deploy@v1
33+
with:
34+
production_branch: main
35+
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_VICTORIOUS_GROUND_017B08103 }}
36+
repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments)
37+
action: "upload"
38+
###### Repository/Build Configurations - These values can be configured to match your app requirements. ######
39+
# For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig
40+
app_location: "src/Umbraco.Web.UI.Client" # App source code path
41+
app_build_command: "npm run build:for:static"
42+
output_location: "dist" # Built app content directory - optional
43+
skip_api_build: true # Set to true if you do not have an Azure Functions API in your repo
44+
###### End of Repository/Build Configurations ######
45+
46+
close_pull_request_job:
47+
if: github.event_name == 'pull_request' && github.event.action == 'closed'
48+
runs-on: ubuntu-latest
49+
name: Close Pull Request Job
50+
steps:
51+
- name: Close Pull Request
52+
id: closepullrequest
53+
uses: Azure/static-web-apps-deploy@v1
54+
with:
55+
app_location: "src/Umbraco.Web.UI.Client"
56+
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_VICTORIOUS_GROUND_017B08103 }}
57+
action: "close"

0 commit comments

Comments
 (0)